mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-05-08 07:17:59 +00:00
Add a provider method to the EthereumNode
This commit is contained in:
@@ -32,7 +32,7 @@ use alloy::{
|
||||
},
|
||||
};
|
||||
use anyhow::Context as _;
|
||||
use futures::{Stream, StreamExt};
|
||||
use futures::{FutureExt, Stream, StreamExt};
|
||||
use revive_common::EVMVersion;
|
||||
use tokio::sync::OnceCell;
|
||||
use tracing::{Instrument, error, instrument};
|
||||
@@ -542,6 +542,16 @@ impl EthereumNode for GethNode {
|
||||
as Pin<Box<dyn Stream<Item = MinedBlockInformation>>>)
|
||||
})
|
||||
}
|
||||
|
||||
fn provider(
|
||||
&self,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<alloy::providers::DynProvider<Ethereum>>> + '_>>
|
||||
{
|
||||
Box::pin(
|
||||
self.provider()
|
||||
.map(|provider| provider.map(|provider| provider.erased())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GethNodeResolver {
|
||||
|
||||
@@ -43,7 +43,7 @@ use alloy::{
|
||||
},
|
||||
};
|
||||
use anyhow::Context as _;
|
||||
use futures::{Stream, StreamExt};
|
||||
use futures::{FutureExt, Stream, StreamExt};
|
||||
use revive_common::EVMVersion;
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde_with::serde_as;
|
||||
@@ -761,6 +761,16 @@ impl EthereumNode for LighthouseGethNode {
|
||||
as Pin<Box<dyn Stream<Item = MinedBlockInformation>>>)
|
||||
})
|
||||
}
|
||||
|
||||
fn provider(
|
||||
&self,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<alloy::providers::DynProvider<Ethereum>>> + '_>>
|
||||
{
|
||||
Box::pin(
|
||||
self.http_provider()
|
||||
.map(|provider| provider.map(|provider| provider.erased())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct LighthouseGethNodeResolver<F: TxFiller<Ethereum>, P: Provider<Ethereum>> {
|
||||
|
||||
@@ -29,7 +29,7 @@ use alloy::{
|
||||
};
|
||||
use anyhow::Context as _;
|
||||
use async_stream::stream;
|
||||
use futures::Stream;
|
||||
use futures::{FutureExt, Stream};
|
||||
use revive_common::EVMVersion;
|
||||
use revive_dt_common::fs::clear_directory;
|
||||
use revive_dt_format::traits::ResolverApi;
|
||||
@@ -550,6 +550,16 @@ impl EthereumNode for SubstrateNode {
|
||||
Ok(stream)
|
||||
})
|
||||
}
|
||||
|
||||
fn provider(
|
||||
&self,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<alloy::providers::DynProvider<Ethereum>>> + '_>>
|
||||
{
|
||||
Box::pin(
|
||||
self.provider()
|
||||
.map(|provider| provider.map(|provider| provider.erased())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SubstrateNodeResolver {
|
||||
|
||||
@@ -56,7 +56,7 @@ use alloy::{
|
||||
|
||||
use anyhow::Context as _;
|
||||
use async_stream::stream;
|
||||
use futures::Stream;
|
||||
use futures::{FutureExt, Stream};
|
||||
use revive_common::EVMVersion;
|
||||
use revive_dt_common::fs::clear_directory;
|
||||
use revive_dt_config::*;
|
||||
@@ -606,6 +606,16 @@ impl EthereumNode for ZombienetNode {
|
||||
Ok(stream)
|
||||
})
|
||||
}
|
||||
|
||||
fn provider(
|
||||
&self,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<alloy::providers::DynProvider<Ethereum>>> + '_>>
|
||||
{
|
||||
Box::pin(
|
||||
self.provider()
|
||||
.map(|provider| provider.map(|provider| provider.erased())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ZombieNodeResolver<F: TxFiller<Ethereum>, P: Provider<Ethereum>> {
|
||||
|
||||
Reference in New Issue
Block a user