-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
P2SH related RPC improvements #2830
Conversation
ACK |
Note: should be merged after sipa's watch-only address stuff is merged, and modified to work with it. |
Related to that, is addredeemscript useful, if bitcoind has no logic to actually spend coins sent to anything but what is creatable through createmultisigaddress? |
ACK on the other changes. |
@sipa Actually bitcoind can spend any P2SH-encoded scriptPubKey that it knows how to spend, so you can (currently) put a pay-to-pubkey or a pay-to-pubkey-hash in redeemScript and things will work fine. In any case I think the feature of adding arbitrary redeemScripts makes the most sense in the context of watch-only-wallets where the actual mechanism to spend the coins can be handled elsewhere. |
@petertodd Can you remove addredeemscript for now since it seems like the watch stuff is currently delayed? |
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/22536422878d05a7229f74726148dd50051c883f for binaries and test log. |
ACK, changes look good and I tested all 0,1, and 2 byte scripts in decodescript and tried out validateaddress on some p2sh and non-p2sh addresses. |
P2SH related RPC improvements
This is a hackish version of dashpay#2824, meant for 0.13.x only. The reason for this hackish version is that the code has diverged quite a bit and its not worth the effort to backport the hardening code. Even though 0.13.x included a lot of fixes for sporks handling and syncing, I still feel more safe with hardening the spork15 block height. If something goes wrong with spork syncing (e.g. its slower then the first DIP2/3 block arrives), the whole sync process will fail otherwise.
Some currently missing features like decoding a script and adding a specific P2SH redeemScript to the wallet.