diff options
| author | Pieter Wuille <[email protected]> | 2016-10-28 16:51:33 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-11-07 13:56:22 -0800 |
| commit | 657e05ab2e87ff725723fe8a375fc3f8aad02126 (patch) | |
| tree | e20cebbde1dee31d6d21dccdaa2223a5ca1566e3 /src/script/bitcoinconsensus.cpp | |
| parent | Make nType and nVersion private and sometimes const (diff) | |
| download | discoin-657e05ab2e87ff725723fe8a375fc3f8aad02126.tar.xz discoin-657e05ab2e87ff725723fe8a375fc3f8aad02126.zip | |
Make GetSerializeSize a wrapper on top of CSizeComputer
Given that in default GetSerializeSize implementations created by
ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid
of the specialized GetSerializeSize methods everywhere, and just use
CSizeComputer. This removes a lot of code which isn't actually used
anywhere.
For CCompactSize and CVarInt this actually removes a more efficient
size computing algorithm, which is brought back in a later commit.
Diffstat (limited to 'src/script/bitcoinconsensus.cpp')
| -rw-r--r-- | src/script/bitcoinconsensus.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp index 4e2358d9a..ec573c318 100644 --- a/src/script/bitcoinconsensus.cpp +++ b/src/script/bitcoinconsensus.cpp @@ -87,7 +87,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP stream >> tx; if (nIn >= tx.vin.size()) return set_error(err, bitcoinconsensus_ERR_TX_INDEX); - if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen) + if (GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) != txToLen) return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH); // Regardless of the verification result, the tx did not error. |