Skip to content

Commit 60d9452

Browse files
benthecarmanclaude
andcommitted
Mine the initial 101 blocks in one RPC call
The split into 50+51 batches dates to a regtest setup pre-modern bitcoind where 101 blocks could time out the default RPC. With current bitcoind 29.0 this fits comfortably in one call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 72c450e commit 60d9452

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

orange-sdk/tests/test_utils.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,9 @@ async fn create_bitcoind(uuid: Uuid) -> (Arc<Bitcoind>, Arc<ElectrsD>) {
9393
ElectrsD::with_conf(electrsd::downloaded_exe_path().unwrap(), &bitcoind, &electrsd_conf)
9494
.unwrap_or_else(|_| panic!("Failed to start electrsd for test {uuid}"));
9595

96-
// mine 101 blocks to get some spendable funds, split it up into batches
97-
// to avoid potentially hitting RPC timeouts on slower CI systems
96+
// mine 101 blocks to get some spendable funds
9897
let address = bitcoind.client.new_address().unwrap();
99-
for batch_size in [50, 51] {
100-
let _block_hashes = bitcoind.client.generate_to_address(batch_size, &address).unwrap();
101-
}
98+
let _block_hashes = bitcoind.client.generate_to_address(101, &address).unwrap();
10299

103100
wait_for_block(&electrsd.client, 101).await;
104101

0 commit comments

Comments
 (0)