Unit test should not run a “different branch” by default.
This is a cleanup PR of #7022
Unit test should not run a “different branch” by default.
This is a cleanup PR of #7022
53@@ -54,9 +54,9 @@ def run_test(self):
54 # and make sure the mempool code behaves correctly.
55 b = [ self.nodes[0].getblockhash(n) for n in range(101, 105) ]
56 coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ]
57- spend_101_raw = self.create_tx(coinbase_txids[1], node1_address, 50)
58- spend_102_raw = self.create_tx(coinbase_txids[2], node0_address, 50)
59- spend_103_raw = self.create_tx(coinbase_txids[3], node0_address, 50)
0.01 BTC
fee here. (The exact fee does not matter for this test but it should be 0.0148 BTC > fee > 0.00001 BTC
)pruning.py
) with assert(fee!=0)
in mempool to verify there are no zero-fee transactions any more. Haven’t yet checked for free transactions (per policy) though.
assert(nFees!=0);
and assert(nFees >= ::minRelayTxFee.GetFee(nSize));
in mempool.If someone wants to verify this, maybe the following diff might be useful:
$ qa/pull-tester/rpc-tests.py -extended; git diff
0diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py
1index e7173fd..bb89d65 100755
2--- a/qa/pull-tester/rpc-tests.py
3+++ b/qa/pull-tester/rpc-tests.py
4@@ -117,5 +117,5 @@ testScriptsExt = [
5 'txn_doublespend.py',
6 'txn_clone.py --mineblock',
7- 'pruning.py',
8+# 'pruning.py', # too long
9 'forknotify.py',
10 'invalidateblock.py',
11diff --git a/qa/rpc-tests/prioritise_transaction.py b/qa/rpc-tests/prioritise_transaction.py
12index 4a79d38..2ada1be 100755
13--- a/qa/rpc-tests/prioritise_transaction.py
14+++ b/qa/rpc-tests/prioritise_transaction.py
15@@ -107,10 +107,12 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
16
17 try:
18- self.nodes[0].sendrawtransaction(tx2_hex)
19+ # Don't send 0 fee transaction
20+ # self.nodes[0].sendrawtransaction(tx2_hex)
21+ pass
22 except JSONRPCException as exp:
23 assert_equal(exp.error['code'], -26) # insufficient fee
24 assert(tx2_id not in self.nodes[0].getrawmempool())
25 else:
26- assert(False)
27+ assert(True)
28
29 # This is a less than 1000-byte transaction, so just set the fee
30@@ -120,6 +122,6 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
31
32 print "Assert that prioritised free transaction is accepted to mempool"
33- assert_equal(self.nodes[0].sendrawtransaction(tx2_hex), tx2_id)
34- assert(tx2_id in self.nodes[0].getrawmempool())
35+ # assert_equal(self.nodes[0].sendrawtransaction(tx2_hex), tx2_id)
36+ # assert(tx2_id in self.nodes[0].getrawmempool())
37
38 if __name__ == '__main__':
39diff --git a/src/main.cpp b/src/main.cpp
40index 9870bee..4fda8fc 100644
41--- a/src/main.cpp
42+++ b/src/main.cpp
43@@ -970,4 +970,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
44 strprintf("%d", nSigOps));
45
46+ assert(nFees!=0);
47+ assert(nFees >= ::minRelayTxFee.GetFee(nSize));
48+ assert(nModifiedFees >= ::minRelayTxFee.GetFee(nSize));
49+
50 CAmount mempoolRejectFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFee(nSize);
51 if (mempoolRejectFee > 0 && nModifiedFees < mempoolRejectFee) {
The only actual content conflict is in the line where I remove -blockprioritysize=50000
. If you tell me the commit you reviewed initially I can upload it for you.
Indirect content conflicts are two rpc test which rely on priority transaction getting accepted into the mempool:
But those can be addressed in a later pull. (I will only focus on priority transaction getting into blocks)