Skip to content

Commit

Permalink
[actpool] Improve actqueue efficiency (iotexproject#3377)
Browse files Browse the repository at this point in the history
* opt actpool.Add()

* improve actqueue efficiency
  • Loading branch information
Liuhaai authored and dustinxie committed Feb 3, 2023
1 parent 83008ed commit e99d9df
Show file tree
Hide file tree
Showing 8 changed files with 776 additions and 574 deletions.
3 changes: 1 addition & 2 deletions actpool/actioniterator/actioniterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ func NewActionIterator(accountActs map[string][]action.SealedEnvelope) ActionIte

// LoadNext load next action of account of top action
func (ai *actionIterator) loadNextActionForTopAccount() {
sender := ai.heads[0].SrcPubkey()
callerAddrStr := sender.Address().String()
callerAddrStr := ai.heads[0].SenderAddress().String()
if actions, ok := ai.accountActs[callerAddrStr]; ok && len(actions) > 0 {
ai.heads[0], ai.accountActs[callerAddrStr] = actions[0], actions[1:]
heap.Fix(&ai.heads, 0)
Expand Down
Loading

0 comments on commit e99d9df

Please sign in to comment.