MCPcopy
hub / github.com/petertodd/python-bitcoinlib / GetWeight

Method GetWeight

bitcoin/core/__init__.py:710–712  ·  view source on GitHub ↗

Return the block weight: (stripped_size * 3) + total_size

(self)

Source from the content-addressed store, hash-verified

708 return _cached_GetHash
709
710 def GetWeight(self):
711 """Return the block weight: (stripped_size * 3) + total_size"""
712 return len(self.serialize(dict(include_witness=False))) * 3 + len(self.serialize())
713
714class CoreChainParams(object):
715 """Define consensus-critical parameters of a given instance of the Bitcoin system"""

Callers 1

CheckBlockFunction · 0.80

Calls 1

serializeMethod · 0.45

Tested by

no test coverage detected