rpc: Expose GetUTXOStats for testing #16703

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:1908-rpcTestGetUTXOStats changing 2 files +18 −16
  1. MarcoFalke commented at 8:35 pm on August 23, 2019: member

    GetUTXOStats is used to report hash_serialized_2 and total_amount (among other things) over the rpc interface. However, none of the logic can be tested by unit tests, as the function is static in rpc/blockchain.

    This pull does two things:

    • Remove static and expose GetUTXOStats via the header file
    • Reset all stats to 0 at the beginning of the function. Otherwise the total_amount (among others) would accumulate over successive calls, giving obviously incorrect results (seemingly violating BIP 42).
  2. rpc: Expose GetUTXOStats for testing fa8478c562
  3. MarcoFalke added the label Refactoring on Aug 23, 2019
  4. DrahtBot commented at 10:20 pm on August 23, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16539 (wallet: lower -txmaxfee default from 0.1 to 0.01 BTC by Sjors)
    • #16345 (rpc: Add getblockbyheight method by emilengler)
    • #15606 ([experimental] UTXO snapshots by jamesob)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. fanquake added the label RPC/REST/ZMQ on Aug 24, 2019
  6. promag commented at 0:32 am on August 25, 2019: member
    Why submit this change without the actual unit test?
  7. MarcoFalke closed this on Aug 25, 2019

  8. MarcoFalke deleted the branch on Aug 25, 2019
  9. 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-11-21 15:12 UTC

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