public void broadcastTransaction(@Nonnull final Transaction tx) {
   final Intent intent =
       new Intent(
           BlockchainService.ACTION_BROADCAST_TRANSACTION,
           null,
           this,
           BlockchainServiceImpl.class);
   intent.putExtra(BlockchainService.ACTION_BROADCAST_TRANSACTION_HASH, tx.getHash().getBytes());
   assertTrue(config != null);
   startService(intent);
 }
예제 #2
0
 @Override
 public void onTransactionConfidenceChanged(Wallet wallet, Transaction tx) {
   System.out.println("-----> confidence changed: " + tx.getHashAsString());
   TransactionConfidence confidence = tx.getConfidence();
   System.out.println("new block depth: " + confidence.getDepthInBlocks());
 }
예제 #3
0
 @Override
 public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
   System.out.println("-----> coins resceived: " + tx.getHashAsString());
   System.out.println("received: " + tx.getValue(wallet));
 }