From f7ba881bc669451a60fedac58a449794702a3e23 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 21 Jan 2020 15:00:33 -0500 Subject: wallet: Avoid use of Chain::Lock in listsinceblock This is a step toward removing the Chain::Lock class and reducing cs_main locking. This change only affects behavior in the case where wallet last block processed falls behind the chain tip. Previously listsinceblock might not have returned all transactions up to the claimed "lastblock" value in this case, resulting in race conditions and potentially missing transactions in cases where listsinceblock was called in a loop like https://github.com/bitcoin/bitcoin/issues/14338#issuecomment-426706574 --- src/test/interfaces_tests.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/test/interfaces_tests.cpp') diff --git a/src/test/interfaces_tests.cpp b/src/test/interfaces_tests.cpp index caa988df0..f95743ec4 100644 --- a/src/test/interfaces_tests.cpp +++ b/src/test/interfaces_tests.cpp @@ -2,7 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include +#include #include +#include