The reproduction speaks for itself:
diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py
index fc06565983..e06fbf120a 100755
--- a/test/functional/wallet_listsinceblock.py
+++ b/test/functional/wallet_listsinceblock.py
@@ -32,13 +32,14 @@ class ListSinceBlockTest(BitcoinTestFramework):
self.connect_nodes(1, 2)
self.generate(self.nodes[2], COINBASE_MATURITY + 1)
- self.test_no_blockhash()
- self.test_invalid_blockhash()
- self.test_reorg()
- self.test_double_spend()
- self.test_double_send()
- self.double_spends_filtered()
- self.test_targetconfirmations()
+ # self.test_no_blockhash()
+ # self.test_invalid_blockhash()
+ # self.test_reorg()
+ # self.test_double_spend()
+ # self.test_double_send()
+ # self.double_spends_filtered()
+ # self.test_targetconfirmations()
+ self.test_consistent_with_gettransaction()
def test_no_blockhash(self):
self.log.info("Test no blockhash")
@@ -383,5 +384,19 @@ class ListSinceBlockTest(BitcoinTestFramework):
assert_equal(original_found, False)
assert_equal(double_found, False)
+ def test_consistent_with_gettransaction(self):
+ """Test the filtering in listtransactions is consistent with gettransaction's
+ output.
+
+ The block hash parameter gives, according to the documentation, "the block hash
+ to list transactions since". Test that if we have a transaction confirmed at a
+ certain block, listing the coins since this block will output this transaction.
+ """
+ txid = self.nodes[2].sendtoaddress(self.nodes[2].getnewaddress(), 1)
+ self.generate(self.nodes[2], 1)
+ tx = self.nodes[2].gettransaction(txid)
+ coins = self.nodes[2].listsinceblock(tx["blockhash"])["transactions"]
+ assert txid in (c["txid"] for c in coins)
+
if __name__ == '__main__':
ListSinceBlockTest().main()
Is it intended that filtering transaction "since" block N only output transactions confirmed from block N+1?