Interface WalletChangeEventListener

  • All Known Implementing Classes:

    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 Detail

      • onWalletChanged

        void onWalletChanged​(Wallet wallet)

        Designed for GUI applications to refresh their transaction lists. This callback is invoked in the following situations:

        1. A new block is received (and thus building transactions got more confidence)
        2. A pending transaction is received
        3. 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.
        4. A re-organize occurs. Call occurs only if the re-org modified any of our transactions.
        5. A new spend is committed to the wallet.
        6. 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.