mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 14:57:55 +00:00
Add a retry layer to all providers (#224)
* Add a `ReceiptRetryLayer` for providers * Fix the retry layer * Rename the retry layer * Remove outdated polling function * Remoe unneeded dependencies
This commit is contained in:
@@ -49,10 +49,7 @@ use crate::{
|
||||
Node,
|
||||
constants::INITIAL_BALANCE,
|
||||
helpers::{Process, ProcessReadinessWaitBehavior},
|
||||
provider_utils::{
|
||||
ConcreteProvider, FallbackGasFiller, construct_concurrency_limited_provider,
|
||||
execute_transaction,
|
||||
},
|
||||
provider_utils::{ConcreteProvider, FallbackGasFiller, construct_concurrency_limited_provider},
|
||||
};
|
||||
|
||||
static NODE_COUNT: AtomicU32 = AtomicU32::new(0);
|
||||
@@ -434,11 +431,15 @@ impl EthereumNode for SubstrateNode {
|
||||
transaction: TransactionRequest,
|
||||
) -> Pin<Box<dyn Future<Output = anyhow::Result<TransactionReceipt>> + '_>> {
|
||||
Box::pin(async move {
|
||||
let provider = self
|
||||
.provider()
|
||||
self.provider()
|
||||
.await
|
||||
.context("Failed to create the provider")?;
|
||||
execute_transaction(provider, transaction).await
|
||||
.context("Failed to create provider for transaction submission")?
|
||||
.send_transaction(transaction)
|
||||
.await
|
||||
.context("Encountered an error when submitting a transaction")?
|
||||
.get_receipt()
|
||||
.await
|
||||
.context("Failed to get the receipt for the transaction")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user