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

Method __init__

bitcoin/messages.py:115–126  ·  view source on GitHub ↗
(self, protover=PROTO_VERSION)

Source from the content-addressed store, hash-verified

113 command = b"version"
114
115 def __init__(self, protover=PROTO_VERSION):
116 super(msg_version, self).__init__(protover)
117 self.nVersion = protover
118 self.nServices = 1
119 self.nTime = int(time.time())
120 self.addrTo = CAddress(PROTO_VERSION)
121 self.addrFrom = CAddress(PROTO_VERSION)
122 self.nNonce = random.getrandbits(64)
123 self.strSubVer = (b'/python-bitcoinlib:' +
124 bitcoin.__version__.encode('ascii') + b'/')
125 self.nStartingHeight = -1
126 self.fRelay = True
127
128 @classmethod
129 def msg_deser(cls, f, protover=PROTO_VERSION):

Callers

nothing calls this directly

Calls 2

CAddressClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected