From cbebaa1349bc480d5e379dba48d23a6a973487ff Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 14 Sep 2024 04:19:44 -0400 Subject: [PATCH] Tighten documentation on Block::number --- networks/monero/src/block.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/networks/monero/src/block.rs b/networks/monero/src/block.rs index 62a77f8b..15a8d1fc 100644 --- a/networks/monero/src/block.rs +++ b/networks/monero/src/block.rs @@ -79,10 +79,13 @@ pub struct Block { } impl Block { - /// The zero-index position of this block within the blockchain. + /// The zero-indexed position of this block within the blockchain. /// /// This information comes from the Block's miner transaction. If the miner transaction isn't - /// structed as expected, this will return None. + /// structed as expected, this will return None. This will return Some for any Block which would + /// pass the consensus rules. + // https://github.com/monero-project/monero/blob/a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623 + // /src/cryptonote_core/blockchain.cpp#L1365-L1382 pub fn number(&self) -> Option { match &self.miner_transaction { Transaction::V1 { prefix, .. } | Transaction::V2 { prefix, .. } => {