Package org.bitcoinj.jni
Class NativeWalletReorganizeEventListener
- java.lang.Object
-
- org.bitcoinj.jni.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
-
Constructor Summary
Constructors Constructor Description NativeWalletReorganizeEventListener()
-
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.
-
-
-
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 interfaceWalletReorganizeEventListener
-
-