mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: properly convert canon chain event (#9736)
This commit is contained in:
@ -360,6 +360,13 @@ impl ExecutedBlock {
|
||||
&self.senders
|
||||
}
|
||||
|
||||
/// Returns a [`SealedBlockWithSenders`]
|
||||
///
|
||||
/// Note: this clones the block and senders.
|
||||
pub fn sealed_block_with_senders(&self) -> SealedBlockWithSenders {
|
||||
SealedBlockWithSenders { block: (*self.block).clone(), senders: (*self.senders).clone() }
|
||||
}
|
||||
|
||||
/// Returns a reference to the block's execution outcome
|
||||
pub fn execution_outcome(&self) -> &ExecutionOutcome {
|
||||
&self.execution_output
|
||||
|
||||
@ -213,19 +213,19 @@ impl NewCanonicalChain {
|
||||
match self {
|
||||
Self::Commit { new } => CanonStateNotification::Commit {
|
||||
new: Arc::new(Chain::new(
|
||||
vec![],
|
||||
new.iter().map(ExecutedBlock::sealed_block_with_senders),
|
||||
new.last().unwrap().execution_output.deref().clone(),
|
||||
None,
|
||||
)),
|
||||
},
|
||||
Self::Reorg { new, old } => CanonStateNotification::Reorg {
|
||||
old: Arc::new(Chain::new(
|
||||
vec![],
|
||||
new: Arc::new(Chain::new(
|
||||
new.iter().map(ExecutedBlock::sealed_block_with_senders),
|
||||
new.last().unwrap().execution_output.deref().clone(),
|
||||
None,
|
||||
)),
|
||||
new: Arc::new(Chain::new(
|
||||
vec![],
|
||||
old: Arc::new(Chain::new(
|
||||
old.iter().map(ExecutedBlock::sealed_block_with_senders),
|
||||
old.last().unwrap().execution_output.deref().clone(),
|
||||
None,
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user