forked from TrueCloudLab/neoneo-go
mempool: iterate over slice in GetVerifiedTransactions()
It's more efficient and keeps transactions sorted by priority.
This commit is contained in:
parent
e97396e56c
commit
6672f4b26f
1 changed files with 2 additions and 2 deletions
|
@ -251,10 +251,10 @@ func (mp *Pool) GetVerifiedTransactions() []*transaction.Transaction {
|
|||
mp.lock.RLock()
|
||||
defer mp.lock.RUnlock()
|
||||
|
||||
var t = make([]*transaction.Transaction, len(mp.verifiedMap))
|
||||
var t = make([]*transaction.Transaction, len(mp.verifiedTxes))
|
||||
var i int
|
||||
|
||||
for _, p := range mp.verifiedMap {
|
||||
for _, p := range mp.verifiedTxes {
|
||||
t[i] = p.txn
|
||||
i++
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue