|
|
@ -1417,7 +1417,7 @@ void CWallet::UpdateSaplingNullifierNoteMapWithTx(CWalletTx& wtx) { |
|
|
|
if (mapSaplingFullViewingKeys.count(nd.ivk) != 0) { |
|
|
|
SaplingFullViewingKey fvk = mapSaplingFullViewingKeys.at(nd.ivk); |
|
|
|
OutputDescription output = wtx.vShieldedOutput[op.n]; |
|
|
|
auto optPlaintext = SaplingNotePlaintext::decrypt(output.encCiphertext, nd.ivk, output.ephemeralKey, output.cm); |
|
|
|
auto optPlaintext = SaplingNotePlaintext::decrypt(Params().GetConsensus(), chainActive.Height(), output.encCiphertext, nd.ivk, output.ephemeralKey, output.cm); |
|
|
|
if (!optPlaintext) { |
|
|
|
// An item in mapSaplingNoteData must have already been successfully decrypted,
|
|
|
|
// otherwise the item would not exist in the first place.
|
|
|
@ -1778,7 +1778,7 @@ std::pair<mapSaplingNoteData_t, SaplingIncomingViewingKeyMap> CWallet::FindMySap |
|
|
|
bool found = false; |
|
|
|
for (auto it = mapSaplingFullViewingKeys.begin(); it != mapSaplingFullViewingKeys.end(); ++it) { |
|
|
|
SaplingIncomingViewingKey ivk = it->first; |
|
|
|
auto result = SaplingNotePlaintext::decrypt(output.encCiphertext, ivk, output.ephemeralKey, output.cm); |
|
|
|
auto result = SaplingNotePlaintext::decrypt(Params().GetConsensus(), chainActive.Height(), output.encCiphertext, ivk, output.ephemeralKey, output.cm); |
|
|
|
if (result) { |
|
|
|
auto address = ivk.address(result.get().d); |
|
|
|
if (address && mapSaplingIncomingViewingKeys.count(address.get()) == 0) { |
|
|
@ -1797,7 +1797,7 @@ std::pair<mapSaplingNoteData_t, SaplingIncomingViewingKeyMap> CWallet::FindMySap |
|
|
|
if (!found) { |
|
|
|
for (auto it = mapSaplingIncomingViewingKeys.begin(); it != mapSaplingIncomingViewingKeys.end(); ++it) { |
|
|
|
SaplingIncomingViewingKey ivk = it-> second; |
|
|
|
auto result = SaplingNotePlaintext::decrypt(output.encCiphertext, ivk, output.ephemeralKey, output.cm); |
|
|
|
auto result = SaplingNotePlaintext::decrypt(Params().GetConsensus(), chainActive.Height(), output.encCiphertext, ivk, output.ephemeralKey, output.cm); |
|
|
|
if (!result) { |
|
|
|
continue; |
|
|
|
} |
|
|
|