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

Method __init__

test/functional/test_framework/messages.py:1081–1095  ·  view source on GitHub ↗
(self, header=None)

Source from the content-addressed store, hash-verified

1079 "m_signblock_witness")
1080
1081 def __init__(self, header=None):
1082 if header is None:
1083 self.set_null()
1084 else:
1085 self.nVersion = header.nVersion
1086 self.hashPrevBlock = header.hashPrevBlock
1087 self.hashMerkleRoot = header.hashMerkleRoot
1088 self.nTime = header.nTime
1089 self.block_height = header.block_height
1090 self.proof = header.proof
1091 self.sha256 = header.sha256
1092 self.hash = header.hash
1093 self.m_dynafed_params = header.m_dynafed_params
1094 self.m_signblock_witness = header.m_signblock_witness
1095 self.calc_sha256()
1096
1097 def set_null(self):
1098 self.nVersion = 4

Callers

nothing calls this directly

Calls 2

set_nullMethod · 0.95
calc_sha256Method · 0.95

Tested by

no test coverage detected