diff --git a/bitcoind-tests/tests/test_cpp.rs b/bitcoind-tests/tests/test_cpp.rs index 1373e523f..ca04dbceb 100644 --- a/bitcoind-tests/tests/test_cpp.rs +++ b/bitcoind-tests/tests/test_cpp.rs @@ -215,7 +215,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) { // Check whether the node accepts the transactions let txid = cl .send_raw_transaction(&tx) - .expect(&format!("{} send tx failed for ms {}", i, ms)); + .unwrap_or_else(|_| panic!("{} send tx failed for ms {}", i, ms)); spend_txids.push(txid); } } diff --git a/bitcoind-tests/tests/test_desc.rs b/bitcoind-tests/tests/test_desc.rs index d7cd83539..90dd7c0d2 100644 --- a/bitcoind-tests/tests/test_desc.rs +++ b/bitcoind-tests/tests/test_desc.rs @@ -286,7 +286,7 @@ pub fn test_desc_satisfy( // Check whether the node accepts the transactions let txid = cl .send_raw_transaction(&tx) - .expect(&format!("send tx failed for desc {}", definite_desc)); + .unwrap_or_else(|_| panic!("send tx failed for desc {}", definite_desc)); // Finally mine the blocks and await confirmations let _blocks = cl