mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Use logging in individual tests
This commit is contained in:
@@ -64,7 +64,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
|
||||
self.lastblockheight = 429
|
||||
self.lastblocktime = int(time.time()) + 429
|
||||
|
||||
print ("Test 1: NULLDUMMY compliant base transactions should be accepted to mempool and mined before activation [430]")
|
||||
self.log.info("Test 1: NULLDUMMY compliant base transactions should be accepted to mempool and mined before activation [430]")
|
||||
test1txs = [self.create_transaction(self.nodes[0], coinbase_txid[0], self.ms_address, 49)]
|
||||
txid1 = self.tx_submit(self.nodes[0], test1txs[0])
|
||||
test1txs.append(self.create_transaction(self.nodes[0], txid1, self.ms_address, 48))
|
||||
@@ -73,29 +73,29 @@ class NULLDUMMYTest(BitcoinTestFramework):
|
||||
txid3 = self.tx_submit(self.nodes[0], test1txs[2])
|
||||
self.block_submit(self.nodes[0], test1txs, False, True)
|
||||
|
||||
print ("Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation")
|
||||
self.log.info("Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation")
|
||||
test2tx = self.create_transaction(self.nodes[0], txid2, self.ms_address, 47)
|
||||
trueDummy(test2tx)
|
||||
txid4 = self.tx_submit(self.nodes[0], test2tx, NULLDUMMY_ERROR)
|
||||
|
||||
print ("Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]")
|
||||
self.log.info("Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]")
|
||||
self.block_submit(self.nodes[0], [test2tx], False, True)
|
||||
|
||||
print ("Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation")
|
||||
self.log.info("Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation")
|
||||
test4tx = self.create_transaction(self.nodes[0], txid4, self.address, 46)
|
||||
test6txs=[CTransaction(test4tx)]
|
||||
trueDummy(test4tx)
|
||||
self.tx_submit(self.nodes[0], test4tx, NULLDUMMY_ERROR)
|
||||
self.block_submit(self.nodes[0], [test4tx])
|
||||
|
||||
print ("Test 5: Non-NULLDUMMY P2WSH multisig transaction invalid after activation")
|
||||
self.log.info("Test 5: Non-NULLDUMMY P2WSH multisig transaction invalid after activation")
|
||||
test5tx = self.create_transaction(self.nodes[0], txid3, self.wit_address, 48)
|
||||
test6txs.append(CTransaction(test5tx))
|
||||
test5tx.wit.vtxinwit[0].scriptWitness.stack[0] = b'\x01'
|
||||
self.tx_submit(self.nodes[0], test5tx, NULLDUMMY_ERROR)
|
||||
self.block_submit(self.nodes[0], [test5tx], True)
|
||||
|
||||
print ("Test 6: NULLDUMMY compliant base/witness transactions should be accepted to mempool and in block after activation [432]")
|
||||
self.log.info("Test 6: NULLDUMMY compliant base/witness transactions should be accepted to mempool and in block after activation [432]")
|
||||
for i in test6txs:
|
||||
self.tx_submit(self.nodes[0], i)
|
||||
self.block_submit(self.nodes[0], test6txs, True, True)
|
||||
|
||||
Reference in New Issue
Block a user