Skip to content

Commit

Permalink
remove now unused OUTPUT_EXTRA_BYTES
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamISZ authored and kristapsk committed Jan 5, 2024
1 parent 3f3fc89 commit f43d00c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions jmbitcoin/jmbitcoin/secp256k1_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,6 @@
SCRIPT_VERIFY_STRICTENC,
SIGVERSION_WITNESS_V0)

# for each transaction type, different output script pubkeys may result in
# a difference in the number of bytes accounted for while estimating the
# transaction size, this variable stores the difference and is factored in
# when calculating the correct transaction size. For example, for a p2pkh
# transaction, if one of the outputs is a p2wsh pubkey, then the transaction
# would need 9 extra bytes to account for the difference in script pubkey
# sizes
OUTPUT_EXTRA_BYTES = {
'p2pkh': {
'p2wpkh': -3,
'p2sh-p2wpkh': -2,
'p2wsh': 9
},
'p2wpkh': {
'p2pkh': 3,
'p2sh-p2wpkh': 1,
'p2wsh': 12
},
'p2sh-p2wpkh': {
'p2pkh': 2,
'p2wpkh': -1,
'p2wsh': 11
}
}

def human_readable_transaction(tx, jsonified=True):
""" Given a CTransaction object, output a human
readable json-formatted string (suitable for terminal
Expand Down

0 comments on commit f43d00c

Please sign in to comment.