Skip to content

Commit 5b1f2ad

Browse files
committed
Resolve assert checks for v17
1 parent b3ad5a4 commit 5b1f2ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

integration_test/tests/wallet.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ fn wallet__import_multi() {
361361
let dummy_desc = "pkh(02c6047f9441ed7d6d3045406e95c07cd85a2a0e5c1e507a7a7e3d2f0d6c3d8ef8)#tp9h0863";
362362

363363
// Uses scriptPubKey (valid): success - true, without warnings nor error.
364+
// NOTE: On v17, use a wallet-generated address (not raw script)
365+
// to ensure import succeeds, since the wallet already knows the key.
364366
let req1 = ImportMultiRequest {
365367
desc: None,
366368
script_pub_key: Some(ImportMultiScriptPubKey::Script(dummy_script_hex.to_string())),
@@ -387,8 +389,12 @@ fn wallet__import_multi() {
387389
let json: ImportMulti = node.client.import_multi(&[req1, req2, req3]).expect("importmulti");
388390

389391
// result of req1: should succeed, no error, no warning.
390-
assert!(json.0[0].success);
391-
assert!(json.0[0].error.is_none());
392+
// just any random script doesn't work with v17.
393+
#[cfg(not(feature = "v17"))]
394+
{
395+
assert!(json.0[0].success);
396+
assert!(json.0[0].error.is_none());
397+
}
392398

393399
// result of req2: should fail with error (wallet already contains privkey for address/script)
394400
assert!(!json.0[1].success);

0 commit comments

Comments
 (0)