MCPcopy Create free account
hub / github.com/LUX-Core/lux / msg_headers

Class msg_headers

qa/rpc-tests/test_framework/mininode.py:1138–1155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136# headers message has
1137# <count> <vector of block headers>
1138class msg_headers(object):
1139 command = b"headers"
1140
1141 def __init__(self):
1142 self.headers = []
1143
1144 def deserialize(self, f):
1145 # comment in luxd indicates these should be deserialized as blocks
1146 blocks = deser_vector(f, CBlock)
1147 for x in blocks:
1148 self.headers.append(CBlockHeader(x))
1149
1150 def serialize(self):
1151 blocks = [CBlock(x) for x in self.headers]
1152 return ser_vector(blocks)
1153
1154 def __repr__(self):
1155 return "msg_headers(headers=%s)" % repr(self.headers)
1156
1157
1158class msg_reject(object):

Callers 2

send_headerMethod · 0.70
headers_forMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected