RPC bumpfee error with explicit feerate #20219

issue jonatack openend this issue on October 22, 2020
  1. jonatack commented at 4:44 pm on October 22, 2020: member
    RPC bumpfee with an explicit feerate using conf_target and estimate_mode errors with JSONRPCException: JSON integer out of range (-1).
  2. jonatack added the label Bug on Oct 22, 2020
  3. jonatack commented at 5:56 pm on October 25, 2020: member

    Issue can be reproduced with the following code:

     0diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py
     1+++ b/test/functional/wallet_bumpfee.py
     2@@ -17,7 +17,7 @@ from decimal import Decimal
     3-from test_framework.messages import BIP125_SEQUENCE_NUMBER, CTransaction
     4+from test_framework.messages import BIP125_SEQUENCE_NUMBER, COIN, CTransaction
     5 from test_framework.test_framework import BitcoinTestFramework
     6@@ -36,6 +36,8 @@ NORMAL       = 0.00100000
     7 TOO_HIGH     = 1.00000000
     8 
     9+BTC_MODE = "BTC/kB"
    10+SAT_MODE = "sat/B"
    11 
    12@@ -77,8 +79,8 @@ class BumpFeeTest(BitcoinTestFramework):
    13         self.test_invalid_parameters(rbf_node, dest_address)
    14-        test_simple_bumpfee_succeeds(self, "default", rbf_node, peer_node, dest_address)
    15-        test_simple_bumpfee_succeeds(self, "fee_rate", rbf_node, peer_node, dest_address)
    16+        for mode in ["default", "fee_rate", BTC_MODE, SAT_MODE]:
    17+            test_simple_bumpfee_succeeds(self, mode, rbf_node, peer_node, dest_address)
    18         test_feerate_args(self, rbf_node, peer_node, dest_address)
    19@@ -132,6 +134,13 @@ def test_simple_bumpfee_succeeds(self, mode, rbf_node, peer_node, dest_address):
    20     if mode == "fee_rate":
    21         bumped_psbt = rbf_node.psbtbumpfee(rbfid, {"fee_rate": NORMAL})
    22         bumped_tx = rbf_node.bumpfee(rbfid, {"fee_rate": NORMAL})
    23+    elif mode == BTC_MODE:
    24+        bumped_psbt = rbf_node.psbtbumpfee(rbfid, {"conf_target": NORMAL, "estimate_mode": BTC_MODE})
    25+        bumped_tx = rbf_node.bumpfee(rbfid, {"conf_target": NORMAL, "estimate_mode": BTC_MODE})
    26+    elif mode == SAT_MODE:
    27+        sat_fee = NORMAL * COIN / 1000  # convert NORMAL from BTC/kB to sat/B
    28+        bumped_psbt = rbf_node.psbtbumpfee(rbfid, {"conf_target": sat_fee, "estimate_mode": SAT_MODE})
    29+        bumped_tx = rbf_node.bumpfee(rbfid, {"conf_target": sat_fee, "estimate_mode": SAT_MODE})
    30     else:
    31         bumped_psbt = rbf_node.psbtbumpfee(rbfid)
    32         bumped_tx = rbf_node.bumpfee(rbfid)
    
  4. meshcollider referenced this in commit 5d32009f1a on Nov 4, 2020
  5. jonatack commented at 8:39 am on November 4, 2020: member
    Fixed by #20220.
  6. jonatack closed this on Nov 4, 2020

  7. MarcoFalke locked this on Feb 15, 2022


jonatack

Labels
Bug


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: 2024-12-19 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me