MCPcopy Index your code
hub / github.com/jimmysong/programmingbitcoin / test_serialize

Method test_serialize

code-ch13/network.py:261–264  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

259class GetHeadersMessageTest(TestCase):
260
261 def test_serialize(self):
262 block_hex = '0000000000000000001237f46acddf58578a37e213d2a6edc4884a2fcad05ba3'
263 gh = GetHeadersMessage(start_block=bytes.fromhex(block_hex))
264 self.assertEqual(gh.serialize().hex(), '7f11010001a35bd0ca2f4a88c4eda6d213e2378a5758dfcd6af437120000000000000000000000000000000000000000000000000000000000000000000000000000000000')
265
266
267class HeadersMessage:

Callers

nothing calls this directly

Calls 3

serializeMethod · 0.95
GetHeadersMessageClass · 0.70
hexMethod · 0.45

Tested by

no test coverage detected