Fix logic in ReacceptWalletTransactions(), RelayWalletTransaction() and GetAddressBalances()
This commit is contained in:
@@ -1769,7 +1769,7 @@ void CWallet::ReacceptWalletTransactions()
|
||||
|
||||
int nDepth = wtx.GetDepthInMainChain();
|
||||
|
||||
if (!wtx.IsCoinBase() && !wtx.IsCoinStake() && (nDepth == 0 && !wtx.isAbandoned())) {
|
||||
if (!(wtx.IsCoinBase() || wtx.IsCoinStake()) && (nDepth == 0 && !wtx.isAbandoned())) {
|
||||
mapSorted.insert(std::make_pair(wtx.nOrderPos, &wtx));
|
||||
}
|
||||
}
|
||||
@@ -1788,7 +1788,7 @@ void CWallet::ReacceptWalletTransactions()
|
||||
bool CWalletTx::RelayWalletTransaction()
|
||||
{
|
||||
assert(pwallet->GetBroadcastTransactions());
|
||||
if (!IsCoinBase() && !IsCoinStake() && !isAbandoned() && GetDepthInMainChain() == 0)
|
||||
if (!(IsCoinBase() || IsCoinStake()) && !isAbandoned() && GetDepthInMainChain() == 0)
|
||||
{
|
||||
CValidationState state;
|
||||
/* GetDepthInMainChain already catches known conflicts. */
|
||||
@@ -3223,7 +3223,7 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
|
||||
if (!CheckFinalTx(*pcoin) || !pcoin->IsTrusted())
|
||||
continue;
|
||||
|
||||
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)
|
||||
if ((pcoin->IsCoinBase() || pcoin->IsCoinStake()) && pcoin->GetBlocksToMaturity() > 0)
|
||||
continue;
|
||||
|
||||
int nDepth = pcoin->GetDepthInMainChain();
|
||||
|
||||
Reference in New Issue
Block a user