$ ./replace-by-fee.py
Initializing test directory /tmp/testXh5dZU
Running test simple doublespend...
Running test doublespend chain...
JSONRPC error: 64: too-long-mempool-chain
-
sipa commented at 8:21 PM on November 27, 2015: member
-
paveljanik commented at 2:39 PM on November 28, 2015: contributor
This is because of
main.h:52:static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;The code starts with 50 COINs and spends 1 COIN until 10 COINs remain.
This helps here:
diff --git a/qa/rpc-tests/replace-by-fee.py b/qa/rpc-tests/replace-by-fee.py index 537a1ed..5c8b642 100755 --- a/qa/rpc-tests/replace-by-fee.py +++ b/qa/rpc-tests/replace-by-fee.py @@ -145,7 +145,7 @@ class ReplaceByFeeTest(BitcoinTestFramework): def test_doublespend_chain(self): """Doublespend of a long chain""" - initial_nValue = 50*COIN + initial_nValue = 30*COIN tx0_outpoint = make_utxo(self.nodes[0], initial_nValue) prevout = tx0_outpoint @@ -162,10 +162,10 @@ class ReplaceByFeeTest(BitcoinTestFramework): prevout = COutPoint(int(txid, 16), 0) # Whether the double-spend is allowed is evaluated by including all - # child fees - 40 BTC - so this attempt is rejected. + # child fees - 20 BTC - so this attempt is rejected. dbl_tx = CTransaction() dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)] - dbl_tx.vout = [CTxOut(initial_nValue - 30*COIN, CScript([1]))] + dbl_tx.vout = [CTxOut(initial_nValue - 20*COIN, CScript([1]))] dbl_tx_hex = txToHex(dbl_tx) try:But then it fails in
Running test doublespend tree...withRunning test simple doublespend... Running test doublespend chain... Running test doublespend tree... JSONRPC error: 64: too-long-mempool-chain@sdaftuar @petertodd ping
- laanwj added the label Tests on Dec 1, 2015
- laanwj closed this on Dec 1, 2015
- MarcoFalke locked this on Sep 8, 2021
Contributors
Labels