Class NativeWalletReorganizeEventListener

  • All Implemented Interfaces:
    WalletReorganizeEventListener

    public class NativeWalletReorganizeEventListener
    extends java.lang.Object
    implements WalletReorganizeEventListener
    An event listener that relays events to a native C++ object. A pointer to that object is stored in this class using JNI on the native side, thus several instances of this can point to different actual native implementations.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long ptr  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onReorganize​(Wallet wallet)
      This is called when a block is received that triggers a block chain re-organization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ptr

        public long ptr
    • Constructor Detail

      • NativeWalletReorganizeEventListener

        public NativeWalletReorganizeEventListener()
    • Method Detail

      • onReorganize

        public void onReorganize​(Wallet wallet)
        Description copied from interface: WalletReorganizeEventListener

        This is called when a block is received that triggers a block chain re-organization.

        A re-organize means that the consensus (chain) of the network has diverged and now changed from what we believed it was previously. Usually this won't matter because the new consensus will include all our old transactions assuming we are playing by the rules. However it's theoretically possible for our balance to change in arbitrary ways, most likely, we could lose some money we thought we had.

        It is safe to use methods of wallet whilst inside this callback.

        Specified by:
        onReorganize in interface WalletReorganizeEventListener