From 4e20417a87d79a15dd616dbb1202147a87539922 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Wed, 13 Aug 2025 20:45:02 +0200 Subject: [PATCH] fix: box some more futures (#17864) --- crates/e2e-test-utils/src/testsuite/setup.rs | 31 ++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/crates/e2e-test-utils/src/testsuite/setup.rs b/crates/e2e-test-utils/src/testsuite/setup.rs index 2db463cfd8..a13518149f 100644 --- a/crates/e2e-test-utils/src/testsuite/setup.rs +++ b/crates/e2e-test-utils/src/testsuite/setup.rs @@ -141,6 +141,22 @@ where env: &mut Environment, rlp_path: &Path, ) -> Result<()> + where + N: NodeBuilderHelper, + LocalPayloadAttributesBuilder: PayloadAttributesBuilder< + <::Payload as PayloadTypes>::PayloadAttributes, + >, + { + // Note: this future is quite large so we box it + Box::pin(self.apply_with_import_::(env, rlp_path)).await + } + + /// Apply setup using pre-imported chain data from RLP file + async fn apply_with_import_( + &mut self, + env: &mut Environment, + rlp_path: &Path, + ) -> Result<()> where N: NodeBuilderHelper, LocalPayloadAttributesBuilder: PayloadAttributesBuilder< @@ -172,6 +188,18 @@ where /// Apply the setup to the environment pub async fn apply(&mut self, env: &mut Environment) -> Result<()> + where + N: NodeBuilderHelper, + LocalPayloadAttributesBuilder: PayloadAttributesBuilder< + <::Payload as PayloadTypes>::PayloadAttributes, + >, + { + // Note: this future is quite large so we box it + Box::pin(self.apply_::(env)).await + } + + /// Apply the setup to the environment + async fn apply_(&mut self, env: &mut Environment) -> Result<()> where N: NodeBuilderHelper, LocalPayloadAttributesBuilder: PayloadAttributesBuilder< @@ -180,8 +208,7 @@ where { // If import_rlp_path is set, use apply_with_import instead if let Some(rlp_path) = self.import_rlp_path.take() { - // Note: this future is quite large so we box it - return Box::pin(self.apply_with_import::(env, &rlp_path)).await; + return self.apply_with_import::(env, &rlp_path).await; } let chain_spec = self.chain_spec.clone().ok_or_else(|| eyre!("Chain specification is required"))?;