aboutsummaryrefslogtreecommitdiff
path: root/src/consensus
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-06-12 19:47:19 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-06-12 19:47:19 +0100
commitd2f6d2a95a9f6c1632c1ed3b5b5b67a49eb71d6b (patch)
tree2675bdd2c5101fcc85b8503985cd368b6d92c331 /src/consensus
parentc92fd638860c5b4477851fb3790bc8068f808d3e (diff)
downloadbitcoin-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.h2
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);
}