diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-06-12 19:47:19 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-06-12 19:47:19 +0100 |
commit | d2f6d2a95a9f6c1632c1ed3b5b5b67a49eb71d6b (patch) | |
tree | 2675bdd2c5101fcc85b8503985cd368b6d92c331 /src/consensus | |
parent | c92fd638860c5b4477851fb3790bc8068f808d3e (diff) | |
download | bitcoin-d2f6d2a95a9f6c1632c1ed3b5b5b67a49eb71d6b.tar.xz |
Use `int32_t` type for most transaction size/weight values
This change gets rid of a few casts and makes the following commit diff
smaller.
Diffstat (limited to 'src/consensus')
-rw-r--r-- | src/consensus/validation.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/consensus/validation.h b/src/consensus/validation.h index ad8ee676b2..d5bf08cd61 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -145,7 +145,7 @@ class BlockValidationState : public ValidationState<BlockValidationResult> {}; // using only serialization with and without witness data. As witness_size // is equal to total_size - stripped_size, this formula is identical to: // weight = (stripped_size * 3) + total_size. -static inline int64_t GetTransactionWeight(const CTransaction& tx) +static inline int32_t GetTransactionWeight(const CTransaction& tx) { return ::GetSerializeSize(tx, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(tx, PROTOCOL_VERSION); } |