diff options
| author | Pieter Wuille <[email protected]> | 2014-09-10 01:38:43 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-09-10 01:44:30 +0200 |
| commit | f7cdcb80ab7016e33e8399df796885ce54eb63b0 (patch) | |
| tree | 0d8dc00b07b55b3be99fb475d04827f5e37506c6 /src/bitcoin-tx.cpp | |
| parent | Merge pull request #4882 (diff) | |
| parent | Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (diff) | |
| download | discoin-f7cdcb80ab7016e33e8399df796885ce54eb63b0.tar.xz discoin-f7cdcb80ab7016e33e8399df796885ce54eb63b0.zip | |
Merge pull request #4822
629d75f Combine CCoinsViewCache's HaveCoins and const GetCoins into AccessCoins. (Pieter Wuille)
Diffstat (limited to 'src/bitcoin-tx.cpp')
| -rw-r--r-- | src/bitcoin-tx.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index c45535141..91525b51c 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -420,12 +420,12 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr) // Sign what we can: for (unsigned int i = 0; i < mergedTx.vin.size(); i++) { CTxIn& txin = mergedTx.vin[i]; - CCoins coins; - if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n)) { + const CCoins* coins = view.AccessCoins(txin.prevout.hash); + if (!coins || !coins->IsAvailable(txin.prevout.n)) { fComplete = false; continue; } - const CScript& prevPubKey = coins.vout[txin.prevout.n].scriptPubKey; + const CScript& prevPubKey = coins->vout[txin.prevout.n].scriptPubKey; txin.scriptSig.clear(); // Only sign SIGHASH_SINGLE if there's a corresponding output: |