mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
example(exex): tests for OP Bridge (#8658)
This commit is contained in:
@ -145,6 +145,26 @@ impl TestExExHandle {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Send a notification to the Execution Extension that the chain has been reorged
|
||||
pub async fn send_notification_chain_reorged(
|
||||
&self,
|
||||
old: Chain,
|
||||
new: Chain,
|
||||
) -> eyre::Result<()> {
|
||||
self.notifications_tx
|
||||
.send(ExExNotification::ChainReorged { old: Arc::new(old), new: Arc::new(new) })
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Send a notification to the Execution Extension that the chain has been reverted
|
||||
pub async fn send_notification_chain_reverted(&self, chain: Chain) -> eyre::Result<()> {
|
||||
self.notifications_tx
|
||||
.send(ExExNotification::ChainReverted { old: Arc::new(chain) })
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Asserts that the Execution Extension did not emit any events.
|
||||
#[track_caller]
|
||||
pub fn assert_events_empty(&self) {
|
||||
|
||||
Reference in New Issue
Block a user