Move birthday optimization out of ScanForWalletTransactions
Move birthday optimization out of ScanForWalletTransactions

>>> backports bitcoin@ccf84bb9c10b4397f1a2aed6cf83fa0172c5cf7f

This change has no effect on wallet behavior.

On wallet startup, the transaction scan avoids reading any blocks with
timestamps older than the wallet birthday (less than nTimeFirstKey -
TIMESTAMP_WINDOW). This block skipping code currently resides in
CWallet::ScanForWalletTransactions but it doesn't really belong there
because it makes the implementation unnecessarily fragile and hard to
understand, and it never has any effect except at startup (because all
other callers do their rescans based on timestamps other than, but
always greater or equal to, nTimeFirstKey).
Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,PIVX-Project/PIVX,Darknet-Crypto/Darknet,Darknet-Crypto/Darknet