mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 01:41:48 +00:00
network: try connecting to seeds indefinitely, use them with 0 pool
If the node is to start with seeds unavailable it will try connecting to each of them three times, blacklist them and then sit forever waiting for something. It's not a good behavior, it should always try connecting to seeds if nothing else works.
This commit is contained in:
parent
8028e08abc
commit
38a22b44b2
3 changed files with 54 additions and 7 deletions
|
@ -151,6 +151,7 @@ func NewServer(config ServerConfig, chain blockchainer.Blockchainer, log *zap.Lo
|
|||
|
||||
s.transport = NewTCPTransport(s, net.JoinHostPort(config.Address, strconv.Itoa(int(config.Port))), s.log)
|
||||
s.discovery = NewDefaultDiscovery(
|
||||
s.Seeds,
|
||||
s.DialTimeout,
|
||||
s.transport,
|
||||
)
|
||||
|
@ -171,8 +172,6 @@ func (s *Server) Start(errChan chan error) {
|
|||
|
||||
s.tryStartConsensus()
|
||||
|
||||
s.discovery.BackFill(s.Seeds...)
|
||||
|
||||
go s.broadcastTxLoop()
|
||||
go s.relayBlocksLoop()
|
||||
go s.bQueue.run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue