aboutsummaryrefslogtreecommitdiff
path: root/src/test/interfaces_tests.cpp
AgeCommit message (Collapse)Author
2020-04-15test: Verify findCommonAncestor always initializes outputsRussell Yanofsky
Also add code comment to clarify surprising code noted by practicalswift https://github.com/bitcoin/bitcoin/pull/18657#issuecomment-614278450
2020-03-31wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactionsRussell Yanofsky
This is a step toward removing the Chain::Lock class and reducing cs_main locking. This change affects behavior in a few small ways. - If there's no max_height specified, percentage progress is measured ending at wallet last processed block instead of node tip - More consistent error reporting: Early check to see if start_block is on the active chain is removed, so start_block is always read and the triggers an error if it's unavailable
2020-03-31wallet: Avoid use of Chain::Lock in rescanblockchainRussell Yanofsky
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. The rescanblockchain error height error checking will just be stricter in this case and only accept values up to the last processed height
2020-03-31wallet refactor: Avoid use of Chain::Lock in CWallet::RescanFromTimeRussell Yanofsky
This is a step toward removing the Chain::Lock class and reducing cs_main locking. This change has no effect on behavior.
2020-03-31wallet: Avoid use of Chain::Lock in listsinceblockRussell Yanofsky
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
2020-03-31wallet: Avoid use of Chain::Lock in importprunedfundsRussell Yanofsky
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, in which case the "Block not found in chain" error will be stricter and not allow importing data from a blocks between the wallet last processed tip and the current node tip.
2020-03-31refactor: Add interfaces::FoundBlock class to selectively return block dataRussell Yanofsky
FoundBlock class allows interfaces::Chain::findBlock to return more block information without having lots of optional output parameters. FoundBlock class is also used by other chain methods in upcoming commits. There is mostly no change in behavior. Only exception is CWallet::RescanFromTime now throwing NonFatalCheckError instead of std::logic_error.