example(exex): tests for OP Bridge (#8658)

This commit is contained in:
Alexey Shekhirin
2024-06-07 16:52:44 +01:00
committed by GitHub
parent ade059235b
commit d0e3504ecc
5 changed files with 208 additions and 1 deletions

View File

@ -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) {