Skip to content

Commit

Permalink
Use CLVMObject protocol. (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkiss authored Nov 14, 2023
1 parent 192fb78 commit c4d3eac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clvm/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ def sexp_to_byte_iterator(sexp):
todo_stack = [sexp]
while todo_stack:
sexp = todo_stack.pop()
pair = sexp.as_pair()
pair = sexp.pair
if pair:
yield bytes([CONS_BOX_MARKER])
todo_stack.append(pair[1])
todo_stack.append(pair[0])
else:
yield from atom_to_byte_iterator(sexp.as_atom())
yield from atom_to_byte_iterator(sexp.atom)


def atom_to_byte_iterator(as_atom):
Expand Down

0 comments on commit c4d3eac

Please sign in to comment.