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

Method get_header

bitcoin/core/__init__.py:685–695  ·  view source on GitHub ↗

Return the block header Returned header is a new object.

(self)

Source from the content-addressed store, hash-verified

683 VectorSerializer.stream_serialize(CTransaction, self.vtx, f, dict(include_witness=include_witness))
684
685 def get_header(self):
686 """Return the block header
687
688 Returned header is a new object.
689 """
690 return CBlockHeader(nVersion=self.nVersion,
691 hashPrevBlock=self.hashPrevBlock,
692 hashMerkleRoot=self.hashMerkleRoot,
693 nTime=self.nTime,
694 nBits=self.nBits,
695 nNonce=self.nNonce)
696
697 def GetHash(self):
698 """Return the block hash

Callers 2

GetHashMethod · 0.95
CheckBlockFunction · 0.80

Calls 1

CBlockHeaderClass · 0.85

Tested by

no test coverage detected