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

Method serialize

code-ch13/script.py:148–154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

146 return result
147
148 def serialize(self):
149 # get the raw serialization (no prepended length)
150 result = self.raw_serialize()
151 # get the length of the whole thing
152 total = len(result)
153 # encode_varint the total length of the result and prepend
154 return encode_varint(total) + result
155
156 def evaluate(self, z, witness):
157 # create a copy as we may need to add to this list if we have a

Callers 1

test_serializeMethod · 0.45

Calls 2

raw_serializeMethod · 0.95
encode_varintFunction · 0.90

Tested by 1

test_serializeMethod · 0.36