src/wallet/wallet.cpp
// Add payment address -> incoming viewing key map entry
Add payment address -> incoming viewing key map entry
Add payment address - > incoming viewing key map entry
bool CWallet::AddSaplingIncomingViewingKey(
    const libzelcash::SaplingIncomingViewingKey &ivk,
    const libzelcash::SaplingPaymentAddress &addr)
{
    AssertLockHeld(cs_wallet); 
    if (!CCryptoKeyStore::AddSaplingIncomingViewingKey(ivk, addr)) {
        return false;
    }
    if (!fFileBacked) {
        return true;
    }
    if (!IsCrypted()) {
        return CWalletDB(strWalletFile).WriteSaplingPaymentAddress(addr, ivk);
    }
    return true;
}
bool CWallet :: AddSaplingIncomingViewingKey ( const libzelcash :: SaplingIncomingViewingKey & ivk , const libzelcash :: SaplingPaymentAddress & addr ) { AssertLockHeld ( cs_wallet ) ; if ( ! CCryptoKeyStore :: AddSaplingIncomingViewingKey ( ivk , addr ) ) { return false ; } if ( ! fFileBacked ) { return true ; } if ( ! IsCrypted ( ) ) { return CWalletDB ( strWalletFile ) . WriteSaplingPaymentAddress ( addr , ivk ) ; } return true ; }
Add payment address -> incoming viewing key map entry
Add payment address - > incoming viewing key map entry
// mapSaplingZKeyMetadata