Use CWalletScanState, CKeyMetadata, CAffectedKeysVisitor