block cleanup (#9117)
* blockchain insert expects owned block instead of block reference * reduce a number of times a block is deserialized * removed cached uncle_bytes from block * removed is_finalized from OpenBlock * removed unused parity_machine::WithMetadata trait * removed commented out code * remove unused metadata from block * remove unused metadata from block * BlockDetails extras may have at most 5 elements
This commit is contained in:
committed by
André Silva
parent
a809621f63
commit
c54beba932
@@ -95,22 +95,6 @@ pub trait Transactions: LiveBlock {
|
||||
fn transactions(&self) -> &[Self::Transaction];
|
||||
}
|
||||
|
||||
/// Trait for blocks which have finalized information.
|
||||
pub trait Finalizable: LiveBlock {
|
||||
/// Get whether the block is finalized.
|
||||
fn is_finalized(&self) -> bool;
|
||||
/// Mark the block as finalized.
|
||||
fn mark_finalized(&mut self);
|
||||
}
|
||||
|
||||
/// A state machine with block metadata.
|
||||
pub trait WithMetadata: LiveBlock {
|
||||
/// Get the current live block metadata.
|
||||
fn metadata(&self) -> Option<&[u8]>;
|
||||
/// Set the current live block metadata.
|
||||
fn set_metadata(&mut self, value: Option<Vec<u8>>);
|
||||
}
|
||||
|
||||
/// Generalization of types surrounding blockchain-suitable state machines.
|
||||
pub trait Machine: for<'a> LocalizedMachine<'a> {
|
||||
/// The block header type.
|
||||
|
||||
Reference in New Issue
Block a user