Package org.bitcoinj.core.listeners
Interface BlocksDownloadedEventListener
-
- All Known Subinterfaces:
PeerDataEventListener
- All Known Implementing Classes:
AbstractPeerDataEventListener,DownloadProgressTracker
public interface BlocksDownloadedEventListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonBlocksDownloaded(Peer peer, Block block, FilteredBlock filteredBlock, int blocksLeft)Called on a Peer thread when a block is received.
-
-
-
Method Detail
-
onBlocksDownloaded
void onBlocksDownloaded(Peer peer, Block block, @Nullable FilteredBlock filteredBlock, int blocksLeft)
Called on a Peer thread when a block is received.
The block may be a Block object that contains transactions, a Block object that is only a header when fast catchup is being used. If set, filteredBlock can be used to retrieve the list of associated transactions.
- Parameters:
peer- the peer receiving the blockblock- the downloaded blockfilteredBlock- if non-null, the object that wraps the block header passed as the block param.blocksLeft- the number of blocks left to download
-
-