diff --git a/src/bitcoin.rs b/src/bitcoin.rs index 0110606..378244c 100644 --- a/src/bitcoin.rs +++ b/src/bitcoin.rs @@ -158,6 +158,13 @@ impl BitcoinNode { .context("Failed to spawn bitcoind process") .map(SpawnOutput::Child) } + + pub async fn generate( + &self, + block_num: u64, + ) -> bitcoincore_rpc::Result> { + RpcApi::generate(self, block_num, None).await + } } #[async_trait] diff --git a/src/framework.rs b/src/framework.rs index 8eec3c3..948eb77 100644 --- a/src/framework.rs +++ b/src/framework.rs @@ -261,7 +261,7 @@ impl TestFramework { da.fund_wallet(NodeKind::Bitcoin.to_string(), blocks_to_fund) .await?; - da.generate(blocks_to_mature, None).await?; + da.generate(blocks_to_mature).await?; self.initial_da_height = da.get_block_count().await?; Ok(()) } diff --git a/tests/bitcoin.rs b/tests/bitcoin.rs index e21f176..424fbf6 100644 --- a/tests/bitcoin.rs +++ b/tests/bitcoin.rs @@ -44,7 +44,7 @@ impl TestCase for BasicSyncTest { f.bitcoin_nodes.disconnect_nodes().await?; // Generate some blocks on node0 - da0.generate(5, None).await?; + da0.generate(5).await?; let height0 = da0.get_block_count().await?; let height1 = da1.get_block_count().await?; diff --git a/tests/docker.rs b/tests/docker.rs index c97b187..7380d59 100644 --- a/tests/docker.rs +++ b/tests/docker.rs @@ -40,7 +40,7 @@ impl TestCase for DockerIntegrationTest { // Wait for blob inscribe tx to be in mempool da.wait_mempool_len(1, None).await?; - da.generate(FINALITY_DEPTH, None).await?; + da.generate(FINALITY_DEPTH).await?; let finalized_height = da.get_finalized_height().await?; batch_prover