mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-27 07:48:44 +00:00
Fix bug
This commit is contained in:
parent
d3627de7f8
commit
4f04923114
@ -166,20 +166,21 @@ func (mp *mempool) BlockCandidateTransactions() []*externalapi.DomainTransaction
|
|||||||
if hasCoinbaseInput || tx.Fee > uint64(numExtraOuts)*constants.SompiPerKaspa {
|
if hasCoinbaseInput || tx.Fee > uint64(numExtraOuts)*constants.SompiPerKaspa {
|
||||||
candidateTxs = append(candidateTxs, tx)
|
candidateTxs = append(candidateTxs, tx)
|
||||||
} else {
|
} else {
|
||||||
if spamTx != nil {
|
txNewestUTXODaaScore := tx.Inputs[0].UTXOEntry.BlockDAAScore()
|
||||||
txNewestUTXODaaScore := tx.Inputs[0].UTXOEntry.BlockDAAScore()
|
for _, input := range tx.Inputs {
|
||||||
for _, input := range tx.Inputs {
|
if input.UTXOEntry.BlockDAAScore() > txNewestUTXODaaScore {
|
||||||
if input.UTXOEntry.BlockDAAScore() > txNewestUTXODaaScore {
|
txNewestUTXODaaScore = input.UTXOEntry.BlockDAAScore()
|
||||||
txNewestUTXODaaScore = input.UTXOEntry.BlockDAAScore()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if spamTx != nil {
|
||||||
if txNewestUTXODaaScore < spamTxNewestUTXODaaScore {
|
if txNewestUTXODaaScore < spamTxNewestUTXODaaScore {
|
||||||
spamTx = tx
|
spamTx = tx
|
||||||
spamTxNewestUTXODaaScore = txNewestUTXODaaScore
|
spamTxNewestUTXODaaScore = txNewestUTXODaaScore
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
spamTx = tx
|
spamTx = tx
|
||||||
|
spamTxNewestUTXODaaScore = txNewestUTXODaaScore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user