diff options
author | Antoine Rondelet <rondelet.antoine@gmail.com> | 2018-07-25 19:25:14 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-07-25 19:25:14 +0800 |
commit | 27a278e6e35836999ac8e4d9a19c406407db8ae5 (patch) | |
tree | 4ebe5ac287bb0ff0a1d83e3b659ccff11f1626fe /core | |
parent | a0bcb16875cbbc47504cc78e9ef569629a0f6c35 (diff) | |
download | dexon-27a278e6e35836999ac8e4d9a19c406407db8ae5.tar.gz dexon-27a278e6e35836999ac8e4d9a19c406407db8ae5.tar.zst dexon-27a278e6e35836999ac8e4d9a19c406407db8ae5.zip |
core: fixed typo in addresssByHeartbeat (#17243)
Diffstat (limited to 'core')
-rw-r--r-- | core/tx_pool.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go index cfc92eb8b..7007f85dd 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -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(addressesByHeartbeat, 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 addressesByHeartbeat []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 addressesByHeartbeat) Len() int { return len(a) } +func (a addressesByHeartbeat) Less(i, j int) bool { return a[i].heartbeat.Before(a[j].heartbeat) } +func (a addressesByHeartbeat) 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. |