Skip to content

Commit 6cadfea

Browse files
committed
[Wallet] Add fStakeDelegation voided in-memory flag
1 parent 80678b7 commit 6cadfea

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,6 +2495,8 @@ bool CWallet::CreateTransaction(const std::vector<std::pair<CScript, CAmount> >&
24952495

24962496

24972497
for (PAIRTYPE(const CWalletTx*, unsigned int) pcoin : setCoins) {
2498+
if(pcoin.first->vout[pcoin.second].scriptPubKey.IsPayToColdStaking())
2499+
wtxNew.fStakeDelegationVoided = true;
24982500
CAmount nCredit = pcoin.first->vout[pcoin.second].nValue;
24992501
//The coin age after the next block (depth+1) is used instead of the current,
25002502
//reflecting an assumption the user would accept a bit more delay for
@@ -5676,6 +5678,7 @@ void CWalletTx::Init(const CWallet* pwalletIn)
56765678
fColdCreditCached = false;
56775679
fDelegatedDebitCached = false;
56785680
fDelegatedCreditCached = false;
5681+
fStakeDelegationVoided = false;
56795682
nDebitCached = 0;
56805683
nCreditCached = 0;
56815684
nImmatureCreditCached = 0;

src/wallet/wallet.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ class CWalletTx : public CMerkleTx
726726
mutable bool fColdCreditCached;
727727
mutable bool fDelegatedDebitCached;
728728
mutable bool fDelegatedCreditCached;
729+
mutable bool fStakeDelegationVoided;
729730
mutable CAmount nDebitCached;
730731
mutable CAmount nCreditCached;
731732
mutable CAmount nImmatureCreditCached;

0 commit comments

Comments
 (0)