Class NativeWalletReorganizeEventListener

java.lang.Object
org.bitcoinj.jni.NativeWalletReorganizeEventListener
All Implemented Interfaces:
WalletReorganizeEventListener

public class NativeWalletReorganizeEventListener extends 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 Details

    • ptr

      public long ptr
  • Constructor Details

    • NativeWalletReorganizeEventListener

      public NativeWalletReorganizeEventListener()
  • Method Details

    • 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