aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-11 16:23:17 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-02 18:37:43 -0800
commit81e3228fcb33e8ed32d8b9fbe917444ba080073a (patch)
tree345dd81bc1661003ea8957fe1f69050b3187d4ac /src/script
parent42fd8dee302fec55ba0970e2f1378edc2797e4ff (diff)
downloadbitcoin-81e3228fcb33e8ed32d8b9fbe917444ba080073a.tar.xz
Make CTransaction actually immutable
Diffstat (limited to 'src/script')
-rw-r--r--src/script/bitcoinconsensus.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 069ac55bfb..036d6ca7bf 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -85,8 +85,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP
}
try {
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
- CTransaction tx;
- stream >> tx;
+ CTransaction tx(deserialize, stream);
if (nIn >= tx.vin.size())
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
if (GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) != txToLen)