public class NativeWalletCoinsSentEventListener extends Object implements WalletCoinsSentEventListener
Modifier and Type | Field and Description |
---|---|
long |
ptr |
Constructor and Description |
---|
NativeWalletCoinsSentEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
onCoinsSent(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
This is called when a transaction is seen that sends coins from this wallet, either
because it was broadcast across the network or because a block was received.
|
public void onCoinsSent(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance)
WalletCoinsSentEventListener
It's safe to modify the wallet from inside this callback, but if you're replaying the block chain you should be careful to avoid such modifications. Otherwise your changes may be overridden by new data from the chain.
onCoinsSent
in interface WalletCoinsSentEventListener
wallet
- The wallet object that this callback relates to (that sent the coins).tx
- The transaction that sent the coins to someone else.prevBalance
- The wallets balance before this transaction was seen.newBalance
- The wallets balance after this transaction was seen. This is the 'estimated' balance.Copyright © 2016. All rights reserved.