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

Class msg_getheaders

test/functional/test_framework/messages.py:1913–1934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1911# vector of hashes
1912# hash_stop (hash of last desired block header, 0 to get as many as possible)
1913class msg_getheaders:
1914 __slots__ = ("hashstop", "locator",)
1915 msgtype = b"getheaders"
1916
1917 def __init__(self):
1918 self.locator = CBlockLocator()
1919 self.hashstop = 0
1920
1921 def deserialize(self, f):
1922 self.locator = CBlockLocator()
1923 self.locator.deserialize(f)
1924 self.hashstop = deser_uint256(f)
1925
1926 def serialize(self):
1927 r = b""
1928 r += self.locator.serialize()
1929 r += ser_uint256(self.hashstop)
1930 return r
1931
1932 def __repr__(self):
1933 return "msg_getheaders(locator=%s, stop=%064x)" \
1934 % (repr(self.locator), self.hashstop)
1935
1936
1937# headers message has

Callers 4

get_headersMethod · 0.90
run_testMethod · 0.90
send_get_headersMethod · 0.50
send_header_requestMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected