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
@@ -43,8 +43,6 @@ pub struct ExtendedHeader {
|
||||
pub is_finalized: bool,
|
||||
/// The parent block difficulty.
|
||||
pub parent_total_difficulty: U256,
|
||||
/// The block metadata information.
|
||||
pub metadata: Option<Vec<u8>>,
|
||||
}
|
||||
|
||||
/// A block header.
|
||||
@@ -418,10 +416,6 @@ impl ::parity_machine::FinalizableHeader for ExtendedHeader {
|
||||
fn is_finalized(&self) -> bool { self.is_finalized }
|
||||
}
|
||||
|
||||
impl ::parity_machine::WithMetadataHeader for ExtendedHeader {
|
||||
fn metadata(&self) -> Option<&[u8]> { self.metadata.as_ref().map(|v| v.as_ref()) }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use rustc_hex::FromHex;
|
||||
|
||||
Reference in New Issue
Block a user