MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetBlockWeight

Function GetBlockWeight

src/consensus/validation.h:151–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 return ::GetSerializeSize(tx, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(tx, PROTOCOL_VERSION);
150}
151static inline int64_t GetBlockWeight(const CBlock& block)
152{
153 return ::GetSerializeSize(block, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(block, PROTOCOL_VERSION);
154}
155
156static inline int64_t GetTransactionInputWeight(const CTransaction& tx, const size_t nIn)
157{

Callers 4

ContextualCheckBlockFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
blockToJSONFunction · 0.85
CreateNewBlockMethod · 0.85

Calls 1

GetSerializeSizeFunction · 0.85

Tested by 1

FUZZ_TARGET_INITFunction · 0.68