wallet: Initialize stop_block to nullptr in ScanForWalletTransactions
Summary:
Previously the argument would be untouched if the first block scan failed. This makes the behavior predictable, and consistent with the documentation.
Backport of core PR14957 and the remaining of PR15321 (see D5238).
Depends on D5563.
Test Plan:
With Clang:
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=ON ninja all check check-functional
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5564