Add newly discovered sapling addresses to the wallet
This commit is contained in:
@@ -156,9 +156,21 @@ bool CBasicKeyStore::AddSaplingFullViewingKey(
|
||||
LOCK(cs_SpendingKeyStore);
|
||||
auto ivk = fvk.in_viewing_key();
|
||||
mapSaplingFullViewingKeys[ivk] = fvk;
|
||||
|
||||
// Add defaultAddr -> SaplingIncomingViewing to SaplingIncomingViewingKeyMap
|
||||
mapSaplingIncomingViewingKeys[defaultAddr] = ivk;
|
||||
|
||||
return AddSaplingIncomingViewingKey(ivk, defaultAddr);
|
||||
}
|
||||
|
||||
// This function updates the wallet's internal address->ivk map.
|
||||
// If we add an address that is already in the map, the map will
|
||||
// remain unchanged as each address only has one ivk.
|
||||
bool CBasicKeyStore::AddSaplingIncomingViewingKey(
|
||||
const libzcash::SaplingIncomingViewingKey &ivk,
|
||||
const libzcash::SaplingPaymentAddress &addr)
|
||||
{
|
||||
LOCK(cs_SpendingKeyStore);
|
||||
|
||||
// Add addr -> SaplingIncomingViewing to SaplingIncomingViewingKeyMap
|
||||
mapSaplingIncomingViewingKeys[addr] = ivk;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user