Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-bitcointx backend for jmbitcoin + bip78 and snicker. #536

Merged
merged 15 commits into from
Jul 10, 2020
Merged
8 changes: 5 additions & 3 deletions jmbitcoin/jmbitcoin/secp256k1_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
from bitcointx.wallet import (P2WPKHCoinAddress, CCoinAddress, P2PKHCoinAddress,
CCoinAddressError)
from bitcointx.core.scripteval import (VerifyScript, SCRIPT_VERIFY_WITNESS,
SCRIPT_VERIFY_P2SH, SIGVERSION_WITNESS_V0)
SCRIPT_VERIFY_P2SH,
SCRIPT_VERIFY_STRICTENC,
SIGVERSION_WITNESS_V0)

def human_readable_transaction(tx, jsonified=True):
""" Given a CTransaction object, output a human
Expand Down Expand Up @@ -203,7 +205,7 @@ def sign(tx, i, priv, hashcode=SIGHASH_ALL, amount=None, native=False):
or: (None, errormsg) in case of failure
"""
# script verification flags
flags = set()
flags = set([SCRIPT_VERIFY_STRICTENC])
AdamISZ marked this conversation as resolved.
Show resolved Hide resolved

def return_err(e):
return None, "Error in signing: " + repr(e)
Expand Down Expand Up @@ -320,7 +322,7 @@ def make_shuffled_tx(ins, outs, version=1, locktime=0):

def verify_tx_input(tx, i, scriptSig, scriptPubKey, amount=None,
witness=None, native=False):
flags = set()
flags = set([SCRIPT_VERIFY_STRICTENC])
if witness:
flags.add(SCRIPT_VERIFY_P2SH)
if native:
Expand Down