Package org.bitcoinj.core.listeners
Interface NewBestBlockListener
- All Known Implementing Classes:
NativeBlockChainListener
,Wallet
public interface NewBestBlockListener
Listener interface for when a new block on the best chain is seen.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
notifyNewBestBlock
(StoredBlock block) Called when a new block on the best chain is seen, after relevant transactions are extracted and sent to us via eitherTransactionReceivedInBlockListener.receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int)
orTransactionReceivedInBlockListener.notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int)
.
-
Method Details
-
notifyNewBestBlock
Called when a new block on the best chain is seen, after relevant transactions are extracted and sent to us via eitherTransactionReceivedInBlockListener.receiveFromBlock(Transaction, StoredBlock, AbstractBlockChain.NewBlockType, int)
orTransactionReceivedInBlockListener.notifyTransactionIsInBlock(Sha256Hash, StoredBlock, AbstractBlockChain.NewBlockType, int)
. If this block is causing a re-organise to a new chain, this method is NOT called even though the block may be the new best block: your reorganize implementation is expected to do whatever would normally be done do for a new best block in this case.- Throws:
VerificationException
-