Package org.bitcoinj.core.listeners
Interface ReorganizeListener
-
- All Known Implementing Classes:
NativeBlockChainListener,Wallet
public interface ReorganizeListenerListener interface for when the best chain has changed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreorganize(StoredBlock splitPoint, java.util.List<StoredBlock> oldBlocks, java.util.List<StoredBlock> newBlocks)Called by theBlockChainwhen the best chain (representing total work done) has changed.
-
-
-
Method Detail
-
reorganize
void reorganize(StoredBlock splitPoint, java.util.List<StoredBlock> oldBlocks, java.util.List<StoredBlock> newBlocks) throws VerificationException
Called by theBlockChainwhen the best chain (representing total work done) has changed. In this case, we need to go through our transactions and find out if any have become invalid. It's possible for our balance to go down in this case: money we thought we had can suddenly vanish if the rest of the network agrees it should be so.The oldBlocks/newBlocks lists are ordered height-wise from top first to bottom last (i.e. newest blocks first).
- Throws:
VerificationException
-
-