pub trait Blockchain {
// Required methods
fn name(&self) -> &str;
fn block(&self, height: usize) -> Option<&dyn Block>;
fn last_block(&self) -> &dyn Block;
fn last_block_mut(&mut self) -> &mut dyn Block;
}Required Methods§
Sourcefn last_block(&self) -> &dyn Block
fn last_block(&self) -> &dyn Block
Returns a reference to the block at the current maximum height.
Sourcefn last_block_mut(&mut self) -> &mut dyn Block
fn last_block_mut(&mut self) -> &mut dyn Block
Returns a mutable reference to the block at the current maximum height.