mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Fix caching of blinding data
This commit is contained in:
parent
f2538b9530
commit
09060cfe0d
2 changed files with 11 additions and 0 deletions
|
|
@ -3823,3 +3823,12 @@ void CWallet::ComputeBlindingData(const CTxOut& output, CAmount& amount, CPubKey
|
|||
pubkey = CPubKey();
|
||||
blindingfactor.SetNull();
|
||||
}
|
||||
|
||||
void CWalletTx::WipeUnknownBlindingData() const
|
||||
{
|
||||
for (unsigned int n = 0; n < vout.size(); n++) {
|
||||
if (GetValueOut(n) == -1) {
|
||||
mapValue["blindingdata"][74 * n] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,6 +372,7 @@ public:
|
|||
fImmatureWatchCreditCached = false;
|
||||
fDebitCached = false;
|
||||
fChangeCached = false;
|
||||
WipeUnknownBlindingData();
|
||||
}
|
||||
|
||||
void BindWallet(CWallet *pwalletIn)
|
||||
|
|
@ -417,6 +418,7 @@ public:
|
|||
|
||||
private:
|
||||
void GetBlindingData(unsigned int nOut, CAmount* pamountOut, CPubKey* ppubkeyOut, uint256* pblindingfactorOut) const;
|
||||
void WipeUnknownBlindingData() const;
|
||||
|
||||
public:
|
||||
//! Returns either the value out (if it is to us) or 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue