Implement a solution for the pre-fund account limit

This commit is contained in:
Omar Abdulla
2025-09-28 16:52:43 +03:00
parent f9dc362c03
commit ec96410546
9 changed files with 228 additions and 32 deletions
+1
View File
@@ -147,6 +147,7 @@ async fn run_driver(
let mut nodes = Vec::<(&dyn Platform, NodePool)>::new();
for platform in platforms.into_iter() {
let pool = NodePool::new(Context::ExecuteTests(Box::new(context.clone())), platform)
.await
.inspect_err(|err| {
error!(
?err,
+9 -1
View File
@@ -16,7 +16,7 @@ pub struct NodePool {
impl NodePool {
/// Create a new Pool. This will start as many nodes as there are workers in `config`.
pub fn new(context: Context, platform: &dyn Platform) -> anyhow::Result<Self> {
pub async fn new(context: Context, platform: &dyn Platform) -> anyhow::Result<Self> {
let concurrency_configuration = AsRef::<ConcurrencyConfiguration>::as_ref(&context);
let nodes = concurrency_configuration.number_of_nodes;
@@ -38,6 +38,14 @@ impl NodePool {
);
}
let pre_transactions_tasks = nodes
.iter_mut()
.map(|node| node.pre_transactions())
.collect::<Vec<_>>();
futures::future::try_join_all(pre_transactions_tasks)
.await
.context("Failed to run the pre-transactions task")?;
Ok(Self {
nodes,
next: Default::default(),