aboutsummaryrefslogtreecommitdiff
path: root/src/test/interfaces_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Dogecoin: Update coinbase maturityRoss Nicoll2021-05-201-1/+1
| | | | | | | * Change coinbase maturity to 240 blocks in most cases, with main/test early chains allowing 30 blocks. I've kept the 240 consistent in regtest to avoid having to redesign a lot of the test cases. * Disabled mining unit test which require COINBASE_MATURITY worth of pre-calculated blocks, as we'd otherwise be constantly refactoring them. * Moved functional test which uses the Bitcoin testnet block data as its reference, as it completely breaks as we introduce Dogecoin data. * Updated standard blockchains for tests from 100/200 to 240/480 as appropriate.
* test: Verify findCommonAncestor always initializes outputsRussell Yanofsky2020-04-151-0/+6
| | | | | Also add code comment to clarify surprising code noted by practicalswift https://github.com/bitcoin/bitcoin/pull/18657#issuecomment-614278450
* wallet: Avoid use of Chain::Lock in CWallet::ScanForWalletTransactionsRussell Yanofsky2020-03-311-0/+15
| | | | | | | | | | | | | | 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
* wallet: Avoid use of Chain::Lock in rescanblockchainRussell Yanofsky2020-03-311-0/+36
| | | | | | | | | | 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
* wallet refactor: Avoid use of Chain::Lock in CWallet::RescanFromTimeRussell Yanofsky2020-03-311-0/+12
| | | | | | | This is a step toward removing the Chain::Lock class and reducing cs_main locking. This change has no effect on behavior.
* wallet: Avoid use of Chain::Lock in listsinceblockRussell Yanofsky2020-03-311-0/+37
| | | | | | | | | | | | 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
* wallet: Avoid use of Chain::Lock in importprunedfundsRussell Yanofsky2020-03-311-0/+10
| | | | | | | | | | 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.
* refactor: Add interfaces::FoundBlock class to selectively return block dataRussell Yanofsky2020-03-311-0/+47
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.