-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: Run feature_cltv with MiniWallet #21754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2a8cc9f to
fa826d6
Compare
fa826d6 to
fac53d1
Compare
|
Concept ACK: more |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
fac53d1 to
fad5d81
Compare
new_tx is a reference to tx. To avoid confusion and code-bloat, remove it
This avoids code-bloat and accidentally forgetting to call it
fad5d81 to
fa066f1
Compare
theStack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa066f1 💽
Nice to see MiniWallet used more and more! The raw_script type introduced will also make it easier to convert other tests to use the internal wallet.
What a pain in the ass. This changes the `feature_cltv` functional test to use the `MiniWallet`, an internal Pythonic wallet that produces "signatures" consisting of several OP_NOPs in a row, so that this test can be used when the wallet is disabled. This means that the functions in feature_cltv which add a CLTV check and change the locktime/sequence number no longer need to re-sign when they change the txid, so they don't...HOWEVER, our Elements-specific `feature_block_v4` test calls these functions with a real transaction and depended on the re-signing behavior. After several attempts at min-effort min-diff fixes I landed on this, which simply sets the locktime at transaction creation and avoids having to re-sign at all. Also, I had to change the number of NOPs in the fake wallet code to make a vsize assertion pass, presumably because of differences in Bitcoin/Elements transaction serialization.
Allows to run the test even with no wallet compiled in