Replace-by-fee RPC test fails on master #7120

issue sipa opened this issue on November 27, 2015
  1. sipa commented at 8:21 PM on November 27, 2015: member
    $ ./replace-by-fee.py 
    Initializing test directory /tmp/testXh5dZU
    Running test simple doublespend...
    Running test doublespend chain...
    JSONRPC error: 64: too-long-mempool-chain
    
  2. 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... with

    Running test simple doublespend...
    Running test doublespend chain...
    Running test doublespend tree...
    JSONRPC error: 64: too-long-mempool-chain
    

    @sdaftuar @petertodd ping

  3. sdaftuar cross-referenced this on Nov 30, 2015 from issue Tests: Explicitly set chain limits in replace-by-fee test by sdaftuar
  4. laanwj added the label Tests on Dec 1, 2015
  5. laanwj closed this on Dec 1, 2015

  6. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:55 UTC