| 1911 | # vector of hashes |
| 1912 | # hash_stop (hash of last desired block header, 0 to get as many as possible) |
| 1913 | class 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 |
no outgoing calls
no test coverage detected