This commit is contained in:
D-Stacks 2022-07-22 21:03:44 +02:00
parent 762ea907c4
commit fa2d4d0ac9
4 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ func HandleGetMempoolEntry(context *rpccontext.Context, _ *router.Router, reques
mempoolTransaction, isOrphan, found := context.Domain.MiningManager().GetTransaction(transactionID, !getMempoolEntryRequest.FilterTransactionPool, getMempoolEntryRequest.IncludeOrphanPool)
if !found || isOrphan && !getMempoolEntryRequest.IncludeOrphanPool || !isOrphan && !getMempoolEntryRequest.FilterTransactionPool {
if !found || isOrphan && !getMempoolEntryRequest.IncludeOrphanPool || !isOrphan && !getMempoolEntryRequest.FilterTransactionPool {
errorMessage := &appmessage.GetMempoolEntryResponseMessage{}
errorMessage.Error = appmessage.RPCErrorf("Transaction %s was not found", transactionID)
return errorMessage, nil

View File

@ -6,7 +6,7 @@ import (
"github.com/kaspanet/kaspad/domain/consensus/utils/transactionhelper"
)
func (mp *mempool) handleNewBlockTransactions(blockTransactions []*externalapi.DomainTransaction,) (
func (mp *mempool) handleNewBlockTransactions(blockTransactions []*externalapi.DomainTransaction) (
[]*externalapi.DomainTransaction, error) {
// Skip the coinbase transaction

View File

@ -64,7 +64,7 @@ func (mp *mempool) GetTransaction(transactionID *externalapi.DomainTransactionID
isOrphan = true
}
return transaction, isOrphan, transactionfound
return transaction, isOrphan, transactionfound
}
func (mp *mempool) GetTransactionsByAddresses(includeTransactionPool bool, includeOrphanPool bool) (

View File

@ -49,12 +49,12 @@ func (mp *mempool) validateAndInsertTransaction(transaction *externalapi.DomainT
return nil, err
}
acceptedOrphans, err := mp.orphansPool.processOrphansAfterAcceptedTransaction(mempoolTransaction.Transaction(),)
acceptedOrphans, err := mp.orphansPool.processOrphansAfterAcceptedTransaction(mempoolTransaction.Transaction())
if err != nil {
return nil, err
}
acceptedTransactions = append([]*externalapi.DomainTransaction{transaction.Clone()}, acceptedOrphans...)
acceptedTransactions = append([]*externalapi.DomainTransaction{transaction.Clone()}, acceptedOrphans...) //these pointer leave the mempool, hence we clone.
err = mp.transactionsPool.limitTransactionCount()
if err != nil {