diff --git a/xcat/checklocktimeverify.py b/xcat/checklocktimeverify.py index 72a8bfd..336e3b9 100644 --- a/xcat/checklocktimeverify.py +++ b/xcat/checklocktimeverify.py @@ -10,7 +10,7 @@ import bitcoin.rpc from bitcoin import SelectParams from bitcoin.core import b2x, lx, b2lx, x, COIN, COutPoint, CMutableTxOut, CMutableTxIn, CMutableTransaction, Hash160, CTransaction from bitcoin.base58 import decode -from bitcoin.core.script import CScript, OP_DUP, OP_IF, OP_ELSE, OP_ENDIF, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG, SignatureHash, SIGHASH_ALL, OP_FALSE, OP_DROP, OP_CHECKLOCKTIMEVERIFY, OP_SHA256, OP_TRUE, OP_FALSE +from bitcoin.core.script import CScript, OP_DUP, OP_IF, OP_ELSE, OP_ENDIF, OP_HASH160, OP_EQUALVERIFY, OP_CHECKSIG, SignatureHash, SIGHASH_ALL, SIGHASH_ANYONECANPAY, OP_FALSE, OP_DROP, OP_CHECKLOCKTIMEVERIFY, OP_SHA256, OP_TRUE, OP_FALSE from bitcoin.core.scripteval import VerifyScript, SCRIPT_VERIFY_P2SH from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret, P2SHBitcoinAddress, P2PKHBitcoinAddress @@ -63,7 +63,7 @@ txout = CMutableTxOut(fundtx['amount'] - FEE, refundAddr.to_scriptPubKey()) # Create the unsigned raw transaction. tx = CMutableTransaction([txin], [txout]) # tx.nLockTime = 2430 -sighash = SignatureHash(redeemScript, tx, 0, SIGHASH_ALL) +sighash = SignatureHash(redeemScript, tx, 0, SIGHASH_ANYONECANPAY) # privkey = bitcoind.dumpprivkey(refundPubKey) # sig = privkey.sign(sighash) + bytes([SIGHASH_ALL])