mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-01 03:01:09 +02:00
qa: Pad scriptPubKeys to get minimum sized txs
This commit is contained in:
@ -80,7 +80,7 @@ class BIP68Test(BitcoinTestFramework):
|
||||
tx2.nVersion = 2
|
||||
sequence_value = sequence_value & 0x7fffffff
|
||||
tx2.vin = [CTxIn(COutPoint(tx1_id, 0), nSequence=sequence_value)]
|
||||
tx2.vout = [CTxOut(int(value-self.relayfee*COIN), CScript([b'a']))]
|
||||
tx2.vout = [CTxOut(int(value - self.relayfee * COIN), CScript([b'a' * 35]))]
|
||||
tx2.rehash()
|
||||
|
||||
assert_raises_rpc_error(-26, NOT_FINAL_ERROR, self.nodes[0].sendrawtransaction, ToHex(tx2))
|
||||
@ -222,7 +222,7 @@ class BIP68Test(BitcoinTestFramework):
|
||||
tx = CTransaction()
|
||||
tx.nVersion = 2
|
||||
tx.vin = [CTxIn(COutPoint(orig_tx.sha256, 0), nSequence=sequence_value)]
|
||||
tx.vout = [CTxOut(int(orig_tx.vout[0].nValue - relayfee*COIN), CScript([b'a']))]
|
||||
tx.vout = [CTxOut(int(orig_tx.vout[0].nValue - relayfee * COIN), CScript([b'a' * 35]))]
|
||||
tx.rehash()
|
||||
|
||||
if (orig_tx.hash in node.getrawmempool()):
|
||||
@ -350,7 +350,7 @@ class BIP68Test(BitcoinTestFramework):
|
||||
tx3 = CTransaction()
|
||||
tx3.nVersion = 2
|
||||
tx3.vin = [CTxIn(COutPoint(tx2.sha256, 0), nSequence=sequence_value)]
|
||||
tx3.vout = [CTxOut(int(tx2.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))]
|
||||
tx3.vout = [CTxOut(int(tx2.vout[0].nValue - self.relayfee * COIN), CScript([b'a' * 35]))]
|
||||
tx3.rehash()
|
||||
|
||||
assert_raises_rpc_error(-26, NOT_FINAL_ERROR, self.nodes[0].sendrawtransaction, ToHex(tx3))
|
||||
|
Reference in New Issue
Block a user