From 46c3ba496858cd18b23ce8b8c367f48002ed5017 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 5 Jul 2021 18:31:32 +0000 Subject: [PATCH] Tweak documentation in `BestBlock` to be a bit more clear --- lightning/src/chain/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index 2e1eaea4e..cec094592 100644 --- a/lightning/src/chain/mod.rs +++ b/lightning/src/chain/mod.rs @@ -38,7 +38,8 @@ pub struct BestBlock { } impl BestBlock { - /// Returns the best block from the genesis of the given network. + /// Constructs a `BestBlock` that represents the genesis block at height 0 of the given + /// network. pub fn from_genesis(network: Network) -> Self { BestBlock { block_hash: genesis_block(network).header.block_hash(), @@ -46,7 +47,7 @@ impl BestBlock { } } - /// Returns the best block as identified by the given block hash and height. + /// Returns a `BestBlock` as identified by the given block hash and height. pub fn new(block_hash: BlockHash, height: u32) -> Self { BestBlock { block_hash, height } } -- 2.39.5