Skip to content

Commit 5d2b3c5

Browse files
feat: merge master into beta
Reduce distance between both branches Issue: BTC-1829
1 parent f19e2de commit 5d2b3c5

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

packages/wasm-miniscript/test/opdrop.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ function getDescriptorOpDropP2ms(locktime: number, keys: utxolib.BIP32Interface[
1212
return `wsh(and_v(r:after(${locktime}),multi(2,${xpubs.join(",")})))`;
1313
}
1414

15-
describe("CLV with OP_DROP", () => {
15+
describe("CLV with OP_DROP", function () {
16+
// OP_DROP enabled in this branch
17+
// return;
18+
1619
const locktime = 1024;
1720
const descriptor = Descriptor.fromString(
1821
getDescriptorOpDropP2ms(locktime, rootWalletKeys.triple),

packages/wasm-miniscript/test/test.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,33 @@ function assertKnownDescriptorType(descriptor: Descriptor) {
5050
}
5151
}
5252

53+
function assertIsErrorUnknownWrapper(error: unknown, wrapper: string) {
54+
assert.ok(error instanceof Error);
55+
assert.ok(error.message.includes(`Error: unknown wrapper «${wrapper}»`));
56+
}
57+
5358
describe("Descriptor fixtures", function () {
5459
fixtures.valid.forEach((fixture, i) => {
5560
describe("fixture " + i, function () {
61+
const isOpDropFixture = i === 59;
5662
let descriptor: Descriptor;
5763

5864
before("setup descriptor", function () {
59-
descriptor = Descriptor.fromString(fixture.descriptor, "derivable");
65+
try {
66+
descriptor = Descriptor.fromString(fixture.descriptor, "derivable");
67+
} catch (e) {
68+
if (isOpDropFixture) {
69+
assertIsErrorUnknownWrapper(e, "r:");
70+
return;
71+
}
72+
throw e;
73+
}
6074
});
6175

76+
if (isOpDropFixture) {
77+
// return;
78+
}
79+
6280
it("should round-trip (pkType string)", function () {
6381
let descriptorString = Descriptor.fromString(fixture.descriptor, "string").toString();
6482
if (fixture.checksumRequired === false) {

0 commit comments

Comments
 (0)