rpc: Fix estimatesmartfee to properly handle a null estimate_mode arg #12940

pull Empact wants to merge 2 commits into bitcoin:master from Empact:fix-estimatesmartfee-null-estimatemode changing 6 files +79 −10
  1. Empact commented at 8:07 am on April 11, 2018: member

    The estimate_mode arg is optional in documentation and handling, but the RPCTypeCheck applied to it did not allow null, therefore its presence was enforced. Note this only affected null values, not entirely absent arguments because RPCTypeCheck only tests against the params list as exists and no farther, so this is a narrow bug.

    This also replaces redundant testing via RPCTypeCheck & RPCTypeCheckArgument in favor of non-redundant calls to RPCTypeCheckArgument. The prior redundancy existed due to the prior limitation of the RPCTypeCheckArgument not being able to allow null.

    Added some call and light functional testing on estimatesmartfee and estimaterawfee as well.

  2. Empact force-pushed on Apr 11, 2018
  3. Empact force-pushed on Apr 11, 2018
  4. fanquake added the label RPC/REST/ZMQ on Apr 11, 2018
  5. Empact force-pushed on Apr 11, 2018
  6. Empact force-pushed on Apr 11, 2018
  7. Enable RPCTypeCheckArgument to accept fAllowNull
    This expands the capability of that method and enables it
    to takeover the same checks from RPCTypeCheck and RPCTypeCheckObj
    
    Note the new test on line 69 is consistent with that
    on line 86 via De Morgan’s law.
    7be8df7b78
  8. Fix estimatesmartfee to properly handle a null estimate_mode arg
    The estimate_mode arg is optional in documentation and handling,
    but the RPCTypeCheck applied to it did not allow null, therefore
    its presence was enforced. Note this only affected null values,
    not entirely absent arguments because RPCTypeCheck only tests
    against the params list as exists and no farther, so this is a
    narrow bug.
    
    This also replaces redundant testing via RPCTypeCheck &
    RPCTypeCheckArgument in favor of non-redundant calls to
    RPCTypeCheckArgument. The prior redundancy existed due
    to the prior limitation of the RPCTypeCheckArgument not
    being able to allow null.
    
    Added some call and light functional testing on estimatesmartfee
    and estimaterawfee as well.
    e9bab1959b
  9. Empact force-pushed on Jul 17, 2018
  10. DrahtBot commented at 6:51 pm on July 24, 2018: member
  11. DrahtBot added the label Needs rebase on Jul 24, 2018
  12. DrahtBot commented at 1:46 pm on October 28, 2018: member
  13. DrahtBot added the label Up for grabs on Oct 28, 2018
  14. DrahtBot closed this on Oct 28, 2018

  15. laanwj removed the label Needs rebase on Oct 24, 2019
  16. MarcoFalke referenced this in commit 309b0c4c19 on Mar 11, 2020
  17. sidhujag referenced this in commit 4cf22d9d97 on Mar 11, 2020
  18. sidhujag referenced this in commit 1f01a50884 on Nov 10, 2020
  19. DrahtBot locked this on Dec 16, 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: 2024-12-19 03:12 UTC

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