Skip to content

Commit 3359aa7

Browse files
committed
[Wallet] GetAvailableP2CSCoins, a p2cs utxo is spendable only if IsMine == ISMINE_SPENDABLE_DELEGATED.
1 parent ec0f537 commit 3359aa7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,9 +1934,10 @@ void CWallet::GetAvailableP2CSCoins(std::vector<COutput>& vCoins) const {
19341934

19351935
if (utxo.scriptPubKey.IsPayToColdStaking()) {
19361936
isminetype mine = IsMine(utxo);
1937-
if (mine & ISMINE_COLD || mine & ISMINE_SPENDABLE_DELEGATED)
1937+
bool isMineSpendable = mine & ISMINE_SPENDABLE_DELEGATED;
1938+
if (mine & ISMINE_COLD || isMineSpendable)
19381939
// Depth is not used, no need waste resources and set it for now.
1939-
vCoins.emplace_back(COutput(pcoin, i, 0, true));
1940+
vCoins.emplace_back(COutput(pcoin, i, 0, isMineSpendable));
19401941
}
19411942
}
19421943
}

0 commit comments

Comments
 (0)