mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Drop UpdateTransaction in favor of UpdateInput
Updating the input explicitly requires the caller to present a mutable input, which more clearly communicates the effects and intent of the method. In most cases, this input is already immediately available and need not be looked up.
This commit is contained in:
parent
1b53e4f67c
commit
6aa33feadb
7 changed files with 14 additions and 21 deletions
|
|
@ -315,7 +315,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup)
|
|||
// Sign
|
||||
SignatureData sigdata;
|
||||
ProduceSignature(keystore, MutableTransactionSignatureCreator(&valid_with_witness_tx, 0, 11*CENT, SIGHASH_ALL), spend_tx.vout[1].scriptPubKey, sigdata);
|
||||
UpdateTransaction(valid_with_witness_tx, 0, sigdata);
|
||||
UpdateInput(valid_with_witness_tx.vin[0], sigdata);
|
||||
|
||||
// This should be valid under all script flags.
|
||||
ValidateCheckInputsForAllFlags(valid_with_witness_tx, 0, true);
|
||||
|
|
@ -343,7 +343,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup)
|
|||
for (int i=0; i<2; ++i) {
|
||||
SignatureData sigdata;
|
||||
ProduceSignature(keystore, MutableTransactionSignatureCreator(&tx, i, 11*CENT, SIGHASH_ALL), spend_tx.vout[i].scriptPubKey, sigdata);
|
||||
UpdateTransaction(tx, i, sigdata);
|
||||
UpdateInput(tx.vin[i], sigdata);
|
||||
}
|
||||
|
||||
// This should be valid under all script flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue