(the fourth argument to listreceivedbyaddress being called address_filter suggests that it can take other JSON expressions, such as a list, but it's really only a JSON string, so there's no reason to treat it differently from other string parameters)
apparently this was mistakingly introduced in 8ee08120de0b6765d8b9081e06f743e15653f8e4
RHavar
commented at 3:35 AM on October 4, 2018:
contributor
Looks good. Also I think the same thing is happening with the new getblockstats
MarcoFalke added the label good first issue on Oct 4, 2018
MarcoFalke added the label Up for grabs on Oct 4, 2018
MarcoFalke added the label Hacktoberfest on Oct 4, 2018
MarcoFalke
commented at 3:57 AM on October 4, 2018:
member
Would be nice to submit the patch with a corresponding test to get this covered?
etscrivner referenced this in commit e57140b5e9 on Oct 6, 2018
etscrivner referenced this in commit ccdcd9eec9 on Oct 6, 2018
etscrivner
commented at 8:47 PM on October 6, 2018:
contributor
Can confirm that something similar is happening with getblockstats by making the following changes to the rpc_getblockstats.py tests:
diff --git a/test/functional/rpc_getblockstats.py b/test/functional/rpc_getblockstats.py
index b24bed6ad..0317e63b8 100755
--- a/test/functional/rpc_getblockstats.py
+++ b/test/functional/rpc_getblockstats.py
@@ -51,6 +51,9 @@ class GetblockstatsTest(BitcoinTestFramework):
def get_stats(self):
return [self.nodes[0].getblockstats(hash_or_height=self.start_height + i) for i in range(self.max_stat_pos+1)]
+ def get_stats_cli(self):
+ return [self.nodes[0].cli.getblockstats(self.start_height + i) for i in range(self.max_stat_pos+1)]
+
def generate_test_data(self, filename):
mocktime = time.time()
self.nodes[0].generate(101)
@@ -176,5 +179,14 @@ class GetblockstatsTest(BitcoinTestFramework):
assert_raises_rpc_error(-5, 'Block not found', self.nodes[0].getblockstats,
hash_or_height='000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f')
+ # Test for regressions on [#14173](/bitcoin-bitcoin/14173/)
+ cli_stats = self.get_stats_cli()
+ assert_equal(set(cli_stats[0].keys()), set(expected_keys))
+
+ for i in range(self.max_stat_pos+1):
+ blockhash = self.expected_stats[i]['blockhash']
+ stats_by_hash = self.nodes[0].cli.getblockstats(hash_or_height=blockhash)
+ assert_equal(stats_by_hash, self.expected_stats[i])
+
if __name__ == '__main__':
GetblockstatsTest().main()
The fix here is less straightforward since the first parameter can be either a number (in which case it needs to be converted using ParseNonRFCJSONValue) or a string (in which case conversion will cause a JSON parsing error). At present conversion is always attempted, causing blockhashes to fail unless explicitly enclosed with double quotes. The crux of the issue being this line here where paths diverge for string and numeric RPC parameters in a way which is not currently reconcilable.
etscrivner
commented at 6:59 PM on October 12, 2018:
contributor
I've created a simple fix (#14417) for the initial issue described here. From my initial analysis above it seems as though fixing other similar issues may involve rethinking ParseNonRFCJsonValue and its associated code a bit.
etscrivner referenced this in commit f80c9efdee on Oct 14, 2018
etscrivner referenced this in commit d4d70eda33 on Oct 14, 2018
MarcoFalke closed this on Oct 23, 2018
MarcoFalke referenced this in commit 94cf1ec948 on Oct 23, 2018
MarcoFalke referenced this in commit b845f7f13b on Oct 23, 2018
MarcoFalke referenced this in commit 1fcd1553a0 on Oct 28, 2018
jfhk referenced this in commit c95cc5a9e3 on Nov 14, 2018
MarcoFalke referenced this in commit 7e126405f9 on Nov 20, 2018
JeremyRubin referenced this in commit 462deeb201 on Nov 24, 2018
HashUnlimited referenced this in commit 18ad3333b0 on Nov 26, 2018
MarcoFalke referenced this in commit fb9ad043f8 on Nov 28, 2018
MarcoFalke removed the label Hacktoberfest on Sep 30, 2019
MarcoFalke removed the label Up for grabs on Sep 30, 2019
MarcoFalke removed the label good first issue on Sep 30, 2019
Munkybooty referenced this in commit c401cab21e on Jul 21, 2021
PastaPastaPasta referenced this in commit ea26a81cea on Aug 16, 2021
vijaydasmp referenced this in commit 604c23cde1 on Sep 8, 2021
vijaydasmp referenced this in commit 0927f06b1f on Sep 8, 2021
vijaydasmp referenced this in commit d79308d0c9 on Sep 8, 2021
vijaydasmp referenced this in commit 9f091c7042 on Sep 9, 2021
vijaydasmp referenced this in commit 334be22a47 on Sep 9, 2021
vijaydasmp referenced this in commit 87fb3da13e on Sep 9, 2021
DrahtBot locked this on Dec 16, 2021
gades referenced this in commit 75b5e67536 on May 31, 2022
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-02 18:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me