MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetTransactionInputWeight

Function GetTransactionInputWeight

src/consensus/validation.h:166–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 return ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS | ser_flag) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | ser_flag);
165}
166static inline int64_t GetTransactionInputWeight(const CTxIn& txin)
167{
168 // scriptWitness size is added here because witnesses and txins are split up in segwit serialization.
169 return ::GetSerializeSize(txin, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(txin, SER_NETWORK, PROTOCOL_VERSION) + ::GetSerializeSize(txin.scriptWitness.stack, SER_NETWORK, PROTOCOL_VERSION);
170}
171
172#endif // BITCOIN_CONSENSUS_VALIDATION_H

Callers 1

Calls 1

GetSerializeSizeFunction · 0.85

Tested by

no test coverage detected