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

Method serialize

code-ch13/tx.py:164–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162
163 # tag::source4[]
164 def serialize(self):
165 if self.segwit:
166 return self.serialize_segwit()
167 else:
168 return self.serialize_legacy()
169
170 def serialize_legacy(self): # <1>
171 result = int_to_little_endian(self.version, 4)

Callers 14

dump_cacheMethod · 0.45
serialize_legacyMethod · 0.45
serialize_segwitMethod · 0.45
sig_hashMethod · 0.45
hash_outputsMethod · 0.45
sig_hash_bip143Method · 0.45
serializeMethod · 0.45
serializeMethod · 0.45
test_parse_inputsMethod · 0.45
test_parse_outputsMethod · 0.45
test_serializeMethod · 0.45
test_input_pubkeyMethod · 0.45

Calls 2

serialize_segwitMethod · 0.95
serialize_legacyMethod · 0.95

Tested by 6

test_parse_inputsMethod · 0.36
test_parse_outputsMethod · 0.36
test_serializeMethod · 0.36
test_input_pubkeyMethod · 0.36
test_sign_inputMethod · 0.36
test_filterloadMethod · 0.36