public interface NewBestBlockListener
Modifier and Type | Method and Description |
---|---|
void |
notifyNewBestBlock(StoredBlock block)
Called when a new block on the best chain is seen, after relevant
transactions are extracted and sent to us via either
TransactionReceivedInBlockListener#receiveFromBlock(org.bitcoinj.core.Transaction, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int relativityOffset)
or TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int) . |
void notifyNewBestBlock(StoredBlock block) throws VerificationException
TransactionReceivedInBlockListener#receiveFromBlock(org.bitcoinj.core.Transaction, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int relativityOffset)
or TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.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.VerificationException
Copyright © 2018. All rights reserved.