-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add redeemScript to raw transactions API #1818
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
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/b8ae01437d2e40a2851c17566203bf35dda0cd1c for binaries and test log. |
|
Code changes look good to me, but needs rebasing, and I understand there is some problems still reported in https://bitcointalk.org/index.php?topic=105505.0 |
signrawtransaction was unable to sign pay-to-script-hash inputs when given the list of private keys to use. With this commit you can provide the p2sh redemption script in the list of inputs.
This is to support the signrawtransaction API call; given the public keys involved in a multisig transaction, this gives back the redeemScript needed to sign it.
|
Rebased, and fixed a crashing bug in signrawtransaction that I think was introduced with ultraprune (assigning coins.vout[nOut].scriptPubKey = scriptPubKey could crash if coins wasnot already in mempool/wallet). Testing TODO:
|
|
The problem I had reported in that thread was totally on my end, the result of a failed (manual) merge left a line missing in my local repo, and it was the line that adds stuff to the tempkeystore, so it was kinda important. I'll pull the rebased version and do more testing, but I won't have time today, and possibly not tomorrow either. |
|
Testing successful, I'm going to pull. |
…y once. 261bd22 Staking process: calculate the stakeable utxo only once. (furszy) Pull request description: Work on top of bitcoin#1816 and part of bitcoin#1817 coinstake transaction creation speedup goal. Starting on 01814d5 Improving the following situation: we are calculating the stakeable utxo twice for the same PoS block creation process (looping over the entire wallet's transactions map twice), one before calling `CreateNewBlock` in `CheckForCoins` and the second one inside the `CreateNewBlock` method when we call `CWallet::CreateCoinStake`. This PR fixes it adding an unique available coins vector calculated before the block creation, only once per try, in the `CheckForCoins` function and feeding `CreateNewBlock` with it. ACKs for top commit: random-zebra: utACK 261bd22 Tree-SHA512: f553667fd48d0d7eb78e2ce87b438c915dc216b32e0426e0214caa52f16a2627143319233c6dd93e4b5d45dcfbb825787c1b39cd209c8e6516bf2391f0516e00
If signrawtransaction is signing a P2SH scriptPubKey, it needs to know the Script that hashes to the P2SH address.
That isn't a problem for transactions that are in the wallet, but if you're giving the private keys to signrawtransaction then it doesn't look in the wallet, and there needed to be some way to provide the redemption Script.
This pull request makes three functional changes:
It also includes new unit tests for the raw transaction API argument checking code (and refactors some argument checking to remove some code duplication).