Package org.bitcoinj.wallet.listeners
Interface WalletChangeEventListener
-
- All Known Implementing Classes:
NativeWalletChangeEventListener
public interface WalletChangeEventListener
Implementors are called when the contents of the wallet changes, for instance due to receiving/sending money or a block chain re-organize.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onWalletChanged(Wallet wallet)
Designed for GUI applications to refresh their transaction lists.
-
-
-
Method Detail
-
onWalletChanged
void onWalletChanged(Wallet wallet)
Designed for GUI applications to refresh their transaction lists. This callback is invoked in the following situations:
- A new block is received (and thus building transactions got more confidence)
- A pending transaction is received
- A pending transaction changes confidence due to some non-new-block related event, such as being announced by more peers or by a double-spend conflict being observed.
- A re-organize occurs. Call occurs only if the re-org modified any of our transactions.
- A new spend is committed to the wallet.
- The wallet is reset and all transactions removed.
When this is called you can refresh the UI contents from the wallet contents. It's more efficient to use this rather than onTransactionConfidenceChanged() + onReorganize() because you only get one callback per block rather than one per transaction per block. Note that this is not called when a key is added.
-
-