BlockInfo
class BlockInfo
Bookkeeping for one block of a downloading piece, the port of piece_picker::block_info. Only pieces that are partially downloaded keep an array of these (see DownloadingPiece); pieces we fully have or have never touched carry none.
In C++ this is a packed bit-field struct (14-bit numPeers + 2-bit state) to fit 8 bytes; we don't need the packing in Kotlin, so the fields are plain.
Properties
Link copied to clipboard
How many peers currently have this block in their request queue. A block in BlockState.REQUESTED has numPeers > 0; in any other state it is 0. (End-game mode is the reason this can exceed 1.)
Link copied to clipboard
The state of this block.