sipa / miniscript

Miniscript site and implementation
157 stars 47 forks source link

Update from Bitcoin Core #135

Closed darosior closed 1 year ago

darosior commented 1 year ago

The PRs introducing Miniscript to Bitcoin Core contained the most up to date version of the code (https://github.com/bitcoin/bitcoin/pull/24148 and https://github.com/bitcoin/bitcoin/pull/24149).

Now they are both merged, update the code here to reflect the updates made in these PRs.

sipa commented 1 year ago

make miniscript and make miniscript.js don't work, due to the NoDupCheck changes, it looks like.

darosior commented 1 year ago

:man_facepalming: Sorry i didn't even try to build the compiler..

The error was because the node constructor now needs a reference to the context. But it should certainly not perform the duplicate key check on all nodes it tries to build.

darosior commented 1 year ago

Updated the compiler to always create nodes using NoDupCheck and to check for duplicate keys only on the top level node in Compile.

Both make miniscript and make miniscript.js work fine now.

sipa commented 1 year ago

ACK 930e2f22cfd3575db21c8bb44920d64a781793e9. Matches the Bitcoin Core master branch code, and compiles.