From 3f01b69084e1cb0a43254ec5b186375d1544245e Mon Sep 17 00:00:00 2001 From: rakita Date: Wed, 9 Dec 2020 12:43:32 +0100 Subject: [PATCH] Fix broken doc comments (#151) --- ethcore/blockchain/src/blockchain.rs | 2 +- ethcore/src/block.rs | 6 +++--- ethcore/src/engines/mod.rs | 2 +- ethcore/src/state/backend.rs | 2 +- ethcore/src/state/mod.rs | 2 +- ethcore/src/verification/verification.rs | 4 ++-- miner/src/pool/queue.rs | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ethcore/blockchain/src/blockchain.rs b/ethcore/blockchain/src/blockchain.rs index b863ff29e..c5872ac1f 100644 --- a/ethcore/blockchain/src/blockchain.rs +++ b/ethcore/blockchain/src/blockchain.rs @@ -1476,7 +1476,7 @@ impl BlockChain { } } - // t_nb 9.12 commit changed to become current greatest by applying pending insertion updates + /// t_nb 9.12 commit changed to become current greatest by applying pending insertion updates pub fn commit(&self) { let mut pending_best_ancient_block = self.pending_best_ancient_block.write(); let mut pending_best_block = self.pending_best_block.write(); diff --git a/ethcore/src/block.rs b/ethcore/src/block.rs index 640a92578..57a3414d3 100644 --- a/ethcore/src/block.rs +++ b/ethcore/src/block.rs @@ -161,7 +161,7 @@ pub trait Drain { } impl<'x> OpenBlock<'x> { - // t_nb 8.1 Create a new `OpenBlock` ready for transaction pushing. + /// t_nb 8.1 Create a new `OpenBlock` ready for transaction pushing. pub fn new<'a, I: IntoIterator>( engine: &'x dyn EthEngine, factories: Factories, @@ -348,7 +348,7 @@ impl<'x> OpenBlock<'x> { }) } - // t_nb 8.5 Turn this into a `LockedBlock`. + /// t_nb 8.5 Turn this into a `LockedBlock`. pub fn close_and_lock(self) -> Result { let mut s = self; @@ -581,7 +581,7 @@ pub(crate) fn enact( b.close_and_lock() } -// t_nb 8.0 Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header +/// t_nb 8.0 Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header pub fn enact_verified( block: PreverifiedBlock, engine: &dyn EthEngine, diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 0113a4589..ca362859d 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -507,7 +507,7 @@ pub trait Engine: Sync + Send { } } -// t_nb 9.3 Check whether a given block is the best block based on the default total difficulty rule. +/// t_nb 9.3 Check whether a given block is the best block based on the default total difficulty rule. pub fn total_difficulty_fork_choice(new: &ExtendedHeader, best: &ExtendedHeader) -> ForkChoice { if new.total_score() > best.total_score() { ForkChoice::New diff --git a/ethcore/src/state/backend.rs b/ethcore/src/state/backend.rs index 2e8118946..53e8ee4a4 100644 --- a/ethcore/src/state/backend.rs +++ b/ethcore/src/state/backend.rs @@ -43,7 +43,7 @@ pub trait Backend: Send { /// Treat the backend as a writeable hashdb. fn as_hash_db_mut(&mut self) -> &mut dyn HashDB; - // t_nb 9.4 Add an account entry to the cache. + /// t_nb 9.4 Add an account entry to the cache. fn add_to_account_cache(&mut self, addr: Address, data: Option, modified: bool); /// Add a global code cache entry. This doesn't need to worry about canonicality because diff --git a/ethcore/src/state/mod.rs b/ethcore/src/state/mod.rs index 740c666e7..66da05f27 100644 --- a/ethcore/src/state/mod.rs +++ b/ethcore/src/state/mod.rs @@ -996,7 +996,7 @@ impl State { Ok(()) } - // t_nb 8.5.2 Commits our cached account changes into the trie. + /// t_nb 8.5.2 Commits our cached account changes into the trie. pub fn commit(&mut self) -> Result<(), Error> { assert!(self.checkpoints.borrow().is_empty()); // first, commit the sub trees. diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 012e7ba2b..9cdc83754 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -63,7 +63,7 @@ impl HeapSizeOf for PreverifiedBlock { } } -// t_nb 4.0 Phase 1 quick block verification. Only does checks that are cheap. Operates on a single block +/// t_nb 4.0 Phase 1 quick block verification. Only does checks that are cheap. Operates on a single block pub fn verify_block_basic( block: &Unverified, engine: &dyn EthEngine, @@ -161,7 +161,7 @@ pub struct FullFamilyParams<'a, C: BlockInfo + CallContract + 'a> { pub client: &'a C, } -// t_nb 6.3 Phase 3 verification. Check block information against parent and uncles. +/// t_nb 6.3 Phase 3 verification. Check block information against parent and uncles. pub fn verify_block_family( header: &Header, parent: &Header, diff --git a/miner/src/pool/queue.rs b/miner/src/pool/queue.rs index 45d17090b..92bdf2f07 100644 --- a/miner/src/pool/queue.rs +++ b/miner/src/pool/queue.rs @@ -472,7 +472,7 @@ impl TransactionQueue { (pending_readiness, state_readiness) } - // t_nb 10.5.1 Culls all stalled transactions from the pool. + /// t_nb 10.5.1 Culls all stalled transactions from the pool. pub fn cull(&self, client: C) { trace_time!("pool::cull"); // We don't care about future transactions, so nonce_cap is not important.