doc: Update a CheckpointList comment
This commit is contained in:
parent
c9ee85c3b5
commit
359febb2e2
|
@ -25,12 +25,15 @@ const TESTNET_CHECKPOINTS: &str = include_str!("test-checkpoints.txt");
|
||||||
// TODO(jlusby): Error = Report ?
|
// TODO(jlusby): Error = Report ?
|
||||||
type Error = Box<dyn error::Error + Send + Sync + 'static>;
|
type Error = Box<dyn error::Error + Send + Sync + 'static>;
|
||||||
|
|
||||||
/// Checkpoint lists are implemented using a BTreeMap.
|
/// A list of block height and hash checkpoints.
|
||||||
///
|
///
|
||||||
/// Checkpoints should be chosen to avoid forks or chain reorganizations,
|
/// Checkpoints should be chosen to avoid forks or chain reorganizations,
|
||||||
/// which only happen in the last few hundred blocks in the chain.
|
/// which only happen in the last few hundred blocks in the chain.
|
||||||
/// (zcashd allows chain reorganizations up to 99 blocks, and prunes
|
/// (zcashd allows chain reorganizations up to 99 blocks, and prunes
|
||||||
/// orphaned side-chains after 288 blocks.)
|
/// orphaned side-chains after 288 blocks.)
|
||||||
|
///
|
||||||
|
/// This is actually a bijective map, but since it is read-only, we use a
|
||||||
|
/// BTreeMap, and do the value uniqueness check on initialisation.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct CheckpointList(BTreeMap<BlockHeight, BlockHeaderHash>);
|
pub(crate) struct CheckpointList(BTreeMap<BlockHeight, BlockHeaderHash>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue