Fix broken doc comments (#151)
This commit is contained in:
parent
647ff31942
commit
3f01b69084
@ -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();
|
||||
|
@ -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<Item = ExtendedHeader>>(
|
||||
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<LockedBlock, Error> {
|
||||
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,
|
||||
|
@ -507,7 +507,7 @@ pub trait Engine<M: Machine>: 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
|
||||
|
@ -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<KeccakHasher, DBValue>;
|
||||
|
||||
// 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<Account>, modified: bool);
|
||||
|
||||
/// Add a global code cache entry. This doesn't need to worry about canonicality because
|
||||
|
@ -996,7 +996,7 @@ impl<B: Backend> State<B> {
|
||||
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.
|
||||
|
@ -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<C: BlockInfo + CallContract>(
|
||||
header: &Header,
|
||||
parent: &Header,
|
||||
|
@ -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<C: client::NonceClient + Clone>(&self, client: C) {
|
||||
trace_time!("pool::cull");
|
||||
// We don't care about future transactions, so nonce_cap is not important.
|
||||
|
Loading…
Reference in New Issue
Block a user