Update ethereum to include dialer fix
This commit is contained in:
parent
1a3e62a756
commit
1ecfd0dd68
2
go.mod
2
go.mod
|
@ -55,4 +55,4 @@ require (
|
|||
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772 // indirect
|
||||
)
|
||||
|
||||
replace github.com/ethereum/go-ethereum v1.8.27 => github.com/status-im/go-ethereum v1.8.27-status
|
||||
replace github.com/ethereum/go-ethereum v1.8.27 => github.com/status-im/go-ethereum v1.8.27-status.4
|
||||
|
|
4
go.sum
4
go.sum
|
@ -499,8 +499,8 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2
|
|||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/status-im/doubleratchet v2.0.0+incompatible h1:s77lF1lDubK0RKftxN2vH8G9gwtVVp13ggWfyY4O1q4=
|
||||
github.com/status-im/doubleratchet v2.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU=
|
||||
github.com/status-im/go-ethereum v1.8.27-status h1:QHUPjJeZHQcgqDJ9nyJDl1u2hzAw8NDtACYGNJg+w6I=
|
||||
github.com/status-im/go-ethereum v1.8.27-status/go.mod h1:Ulij8LMpMvXnbnPcmDqrpI+iXoXSjxItuY/wmbasTZU=
|
||||
github.com/status-im/go-ethereum v1.8.27-status.4 h1:8jTQsYDLtKd/XCa++ZkexTPHfANIDh084JbO2SBAwp4=
|
||||
github.com/status-im/go-ethereum v1.8.27-status.4/go.mod h1:Ulij8LMpMvXnbnPcmDqrpI+iXoXSjxItuY/wmbasTZU=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.1.0 h1:7+BdGNaqb66f/dO7mx/12LjaT+6wr4G8l4wvkONfctg=
|
||||
github.com/status-im/go-multiaddr-ethv4 v1.1.0/go.mod h1:H/WC6o3//elWzBWBe/UhvLl4tqtseVLzO5SFNBtT5SU=
|
||||
github.com/status-im/migrate v3.5.1-status+incompatible h1:MhM/sOyGDrWMkJxamqc9AA3atDXC/RDJzyMJ8XDL3Yg=
|
||||
|
|
|
@ -198,6 +198,9 @@ func (s *dialstate) newTasks(nRunning int, peers map[enode.ID]*Peer, now time.Ti
|
|||
case errNotWhitelisted, errSelf:
|
||||
log.Warn("Removing static dial candidate", "id", t.dest.ID, "addr", &net.TCPAddr{IP: t.dest.IP(), Port: t.dest.TCP()}, "err", err)
|
||||
delete(s.static, t.dest.ID())
|
||||
case errRecentlyDialed:
|
||||
expiry := s.hist.expiry(t.dest.ID())
|
||||
log.Debug("peer was recently dialed", "enode", t.dest.String(), "expires at", expiry, "after", expiry.Sub(time.Now()))
|
||||
case nil:
|
||||
s.dialing[id] = t.flags
|
||||
newtasks = append(newtasks, t)
|
||||
|
@ -411,6 +414,16 @@ func (h dialHistory) contains(id enode.ID) bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (h dialHistory) expiry(id enode.ID) time.Time {
|
||||
for _, v := range h {
|
||||
if v.id == id {
|
||||
return v.exp
|
||||
}
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func (h *dialHistory) expire(now time.Time) {
|
||||
for h.Len() > 0 && h.min().exp.Before(now) {
|
||||
heap.Pop(h)
|
||||
|
|
|
@ -693,6 +693,7 @@ running:
|
|||
// ephemeral static peer list. Add it to the dialer,
|
||||
// it will keep the node connected.
|
||||
srv.log.Trace("Adding static node", "node", n)
|
||||
dialstate.removeStatic(n)
|
||||
dialstate.addStatic(n)
|
||||
case n := <-srv.removestatic:
|
||||
// This channel is used by RemovePeer to send a
|
||||
|
|
|
@ -22,7 +22,7 @@ github.com/davecgh/go-spew/spew
|
|||
github.com/deckarep/golang-set
|
||||
# github.com/edsrzf/mmap-go v1.0.0
|
||||
github.com/edsrzf/mmap-go
|
||||
# github.com/ethereum/go-ethereum v1.8.27 => github.com/status-im/go-ethereum v1.8.27-status
|
||||
# github.com/ethereum/go-ethereum v1.8.27 => github.com/status-im/go-ethereum v1.8.27-status.4
|
||||
github.com/ethereum/go-ethereum/common
|
||||
github.com/ethereum/go-ethereum/crypto
|
||||
github.com/ethereum/go-ethereum/node
|
||||
|
|
Loading…
Reference in New Issue