good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
27a278e6
Commit
27a278e6
authored
Jul 25, 2018
by
Antoine Rondelet
Committed by
Péter Szilágyi
Jul 25, 2018
Browse files
Options
Downloads
Patches
Plain Diff
core: fixed typo in addresssByHeartbeat (#17243)
parent
a0bcb168
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/tx_pool.go
+5
-5
5 additions, 5 deletions
core/tx_pool.go
with
5 additions
and
5 deletions
core/tx_pool.go
+
5
−
5
View file @
27a278e6
...
...
@@ -1041,7 +1041,7 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) {
}
if
queued
>
pool
.
config
.
GlobalQueue
{
// Sort all accounts with queued transactions by heartbeat
addresses
:=
make
(
addresssByHeartbeat
,
0
,
len
(
pool
.
queue
))
addresses
:=
make
(
address
e
sByHeartbeat
,
0
,
len
(
pool
.
queue
))
for
addr
:=
range
pool
.
queue
{
if
!
pool
.
locals
.
contains
(
addr
)
{
// don't drop locals
addresses
=
append
(
addresses
,
addressByHeartbeat
{
addr
,
pool
.
beats
[
addr
]})
...
...
@@ -1127,11 +1127,11 @@ type addressByHeartbeat struct {
heartbeat
time
.
Time
}
type
addresssByHeartbeat
[]
addressByHeartbeat
type
address
e
sByHeartbeat
[]
addressByHeartbeat
func
(
a
addresssByHeartbeat
)
Len
()
int
{
return
len
(
a
)
}
func
(
a
addresssByHeartbeat
)
Less
(
i
,
j
int
)
bool
{
return
a
[
i
]
.
heartbeat
.
Before
(
a
[
j
]
.
heartbeat
)
}
func
(
a
addresssByHeartbeat
)
Swap
(
i
,
j
int
)
{
a
[
i
],
a
[
j
]
=
a
[
j
],
a
[
i
]
}
func
(
a
address
e
sByHeartbeat
)
Len
()
int
{
return
len
(
a
)
}
func
(
a
address
e
sByHeartbeat
)
Less
(
i
,
j
int
)
bool
{
return
a
[
i
]
.
heartbeat
.
Before
(
a
[
j
]
.
heartbeat
)
}
func
(
a
address
e
sByHeartbeat
)
Swap
(
i
,
j
int
)
{
a
[
i
],
a
[
j
]
=
a
[
j
],
a
[
i
]
}
// accountSet is simply a set of addresses to check for existence, and a signer
// capable of deriving addresses from transactions.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment