chore: fix typo (#2296)

This commit is contained in:
Matthias Seitz
2023-04-18 16:42:09 +02:00
committed by GitHub
parent 0761bb42f7
commit 86f8504b2c
2 changed files with 4 additions and 4 deletions

View File

@@ -221,7 +221,7 @@ where
.map(|new_block| {
let new_chain = new_block.expect("new block subscription never ends; qed");
new_chain
.commited()
.committed()
.map(|c| {
c.blocks()
.iter()

View File

@@ -19,7 +19,7 @@ pub trait CanonStateSubscriptions: Send + Sync {
/// Chain action that is triggered when a new block is imported or old block is reverted.
/// and will return all [`crate::PostState`] and [`reth_primitives::SealedBlockWithSenders`] of both
/// reverted and commited blocks.
/// reverted and committed blocks.
#[derive(Clone, Debug)]
#[allow(missing_docs)]
pub enum CanonStateNotification {
@@ -57,7 +57,7 @@ impl CanonStateNotification {
}
/// Get new chain if any.
pub fn commited(&self) -> Option<Arc<Chain>> {
pub fn committed(&self) -> Option<Arc<Chain>> {
match self {
Self::Reorg { new, .. } => Some(new.clone()),
Self::Revert { .. } => None,
@@ -77,7 +77,7 @@ impl CanonStateNotification {
.extend(old.receipts_with_attachment().into_iter().map(|receipt| (receipt, true)));
}
// get new receipts
if let Some(new) = self.commited() {
if let Some(new) = self.committed() {
receipts
.extend(new.receipts_with_attachment().into_iter().map(|receipt| (receipt, false)));
}