Skip to content

Commit

Permalink
cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
fametrano committed Nov 7, 2020
1 parent 05e4c67 commit 7aef738
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions btclib/der.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,4 @@ def _serialize(
result = _serialize_scalar(r)
result += _serialize_scalar(s)
result = b"\x30" + len(result).to_bytes(1, byteorder="big") + result
if sighash is None:
return result

return result + sighash.to_bytes(1, "big")
return result if sighash is None else (result + sighash.to_bytes(1, "big"))

0 comments on commit 7aef738

Please sign in to comment.