MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / __init__

Method __init__

bitcoin/core/__init__.py:503–511  ·  view source on GitHub ↗
(self, nVersion=2, hashPrevBlock=b'\x00'*32, hashMerkleRoot=b'\x00'*32, nTime=0, nBits=0, nNonce=0)

Source from the content-addressed store, hash-verified

501 __slots__ = ['nVersion', 'hashPrevBlock', 'hashMerkleRoot', 'nTime', 'nBits', 'nNonce']
502
503 def __init__(self, nVersion=2, hashPrevBlock=b'\x00'*32, hashMerkleRoot=b'\x00'*32, nTime=0, nBits=0, nNonce=0):
504 object.__setattr__(self, 'nVersion', nVersion)
505 assert len(hashPrevBlock) == 32
506 object.__setattr__(self, 'hashPrevBlock', hashPrevBlock)
507 assert len(hashMerkleRoot) == 32
508 object.__setattr__(self, 'hashMerkleRoot', hashMerkleRoot)
509 object.__setattr__(self, 'nTime', nTime)
510 object.__setattr__(self, 'nBits', nBits)
511 object.__setattr__(self, 'nNonce', nNonce)
512
513 @classmethod
514 def stream_deserialize(cls, f):

Callers

nothing calls this directly

Calls 1

__setattr__Method · 0.80

Tested by

no test coverage detected