bitcoin_core_start
} > /dev/null 2>&1
+setup_test_wallets() {
+ cat > wallet1.descriptors << EOF
+{
+ "wallet_name": "wallet1",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/44'/1'/0'/0/*)#tzs7n72a",
+ "timestamp": 1655929836,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/49'/1'/0'/0/*))#jmxrm0zc",
+ "timestamp": 1655929836,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/84'/1'/0'/0/*)#llselrjy",
+ "timestamp": 1655929836,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/86'/1'/0'/0/*)#p0vpuryp",
+ "timestamp": 1655929836,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/44'/1'/0'/1/*)#6k4lwt69",
+ "timestamp": 1655929836,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/49'/1'/0'/1/*))#5cwxqzfv",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/84'/1'/0'/1/*)#wt4czkzu",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPeD8yyw44GTpzonPir41WK5cS3o7UMDLJiufmNbW4ReMCk9q5UrS9ynty9vyH2QCbxatZsDg4MZUrrujWfSPVNCujUXtSDKx/86'/1'/0'/1/*)#smfqpk5e",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet2.descriptors << EOF
+{
+ "wallet_name": "wallet2",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/44'/1'/0'/0/*)#hta7kvm6",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/49'/1'/0'/0/*))#qgt78vw3",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/84'/1'/0'/0/*)#7n5mv4hy",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/86'/1'/0'/0/*)#5rj7jqqr",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/44'/1'/0'/1/*)#xlcltetz",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/49'/1'/0'/1/*))#xtrmup99",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/84'/1'/0'/1/*)#08363q8u",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPdqqBLnUjZibmJ1CQfNPengbCfJCN4H1ryHVvW36CMhZ7kTCyyGANzeLGFzZwFCYuiMs9m1u32YVgrqA3c7Bm7yk3kM6AVvd/86'/1'/0'/1/*)#9hhl04sm",
+ "timestamp": 1655929837,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet3.descriptors << EOF
+{
+ "wallet_name": "wallet3",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/44'/1'/0'/0/*)#f4evjc6q",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/49'/1'/0'/0/*))#64pdkks9",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/84'/1'/0'/0/*)#0m0c82sf",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/86'/1'/0'/0/*)#frryg4st",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/44'/1'/0'/1/*)#cpud0d2c",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/49'/1'/0'/1/*))#ukfgdmm3",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/84'/1'/0'/1/*)#702e6lq3",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPf8ajraNisX2tTyjeGHaeqh4kzu3uzdc4D9RrRJmoErxhhzb5dcNUH1PqUcr3d3aGxJLdBqi6w38iiD31GyjQVxKcuoNdU7V/86'/1'/0'/1/*)#chx94qqn",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet4.descriptors << EOF
+{
+ "wallet_name": "wallet4",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/44'/1'/0'/0/*)#vhqrracp",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/49'/1'/0'/0/*))#0wh3dpek",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/84'/1'/0'/0/*)#xklz7ech",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/86'/1'/0'/0/*)#cq8cfl65",
+ "timestamp": 1655929838,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/44'/1'/0'/1/*)#ar9z7gge",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/49'/1'/0'/1/*))#fdl5kvjz",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/84'/1'/0'/1/*)#hz6rrvg0",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPfLE512gVXfTk3irRnPToR2EhJ1iWJQWgjqqhDN17YTqr31nV1KuBtX86NrfFzvCSoxB9zQKAwPVttXqCN831WAreyPff1Q2/86'/1'/0'/1/*)#f5ze522v",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet5.descriptors << EOF
+{
+ "wallet_name": "wallet5",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/44'/1'/0'/0/*)#h5mmuhls",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/49'/1'/0'/0/*))#0jj2f86a",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/84'/1'/0'/0/*)#3jv9sxhx",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/86'/1'/0'/0/*)#3d8cykkz",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/44'/1'/0'/1/*)#xq76pz0g",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/49'/1'/0'/1/*))#f360j23f",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/84'/1'/0'/1/*)#qxfydn87",
+ "timestamp": 1655929839,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPdzeP7ZpsmpfNR1vVg8Vk4fRbQtStrrzuBx2NieArfZ8ykZtvBfbFtrhsnfSrSGKZqRdyXK8CJdCw3GmXx12JvMi91R8Y5MB/86'/1'/0'/1/*)#qezeerx6",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet6.descriptors << EOF
+{
+ "wallet_name": "wallet6",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/44'/1'/0'/0/*)#z6tplava",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/49'/1'/0'/0/*))#ktstdeta",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/84'/1'/0'/0/*)#3t483zfh",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/86'/1'/0'/0/*)#23xjrzsm",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/44'/1'/0'/1/*)#nwwqzgu9",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/49'/1'/0'/1/*))#sgcwk5qf",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/84'/1'/0'/1/*)#qlsxvhe0",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPedDiqJFarv77bfM5gsHkdknBrJUj5PRzt27zW778tQZzuDoxAir8CwamSDRkFWtTY3RRBEHaqDdTexvFHJ4cvurLiQ4fbzW/86'/1'/0'/1/*)#m9rn7hqr",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ cat > wallet7.descriptors << EOF
+{
+ "wallet_name": "wallet7",
+ "descriptors": [
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/44'/1'/0'/0/*)#c4ec65vr",
+ "timestamp": 1655929840,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/49'/1'/0'/0/*))#vuy63der",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/84'/1'/0'/0/*)#u2825h6t",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/86'/1'/0'/0/*)#hs066nsw",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": false,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "pkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/44'/1'/0'/1/*)#fpue8pum",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "sh(wpkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/49'/1'/0'/1/*))#2lvl2qjh",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "wpkh(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/84'/1'/0'/1/*)#d7ztfz2n",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ },
+ {
+ "desc": "tr(tprv8ZgxMBicQKsPefbF8gAMusMAzPTZ4JdaFe4sVt28fenqXhpCUmKKW7oFxxKKrctrWJXhieR9mywgsfFq4eXiudU27Jri7pZLrFzxvVN3Jc3/86'/1'/0'/1/*)#xy2m8xqk",
+ "timestamp": 1655929841,
+ "active": true,
+ "internal": true,
+ "range": [
+ 0,
+ 999
+ ],
+ "next": 0
+ }
+ ]
+}
+EOF
+
+ for((i = 1; i<= 7; i++)); do
+ (wallet_load "$i" "wallet$i.descriptors" > result 2>&1)
+ EXPECTED="created blank wallet: wallet$i
+[
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ },
+ {
+ \"success\": true
+ }
+]
+loaded descriptors for wallet$i from wallet$i.descriptors"
+ RESULT=$(<result)
+ assert "$EXPECTED" "$RESULT"
+ done
+}
+
reset_env() {
clean_env
setup_env