mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 13:38:35 +00:00
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