mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-28 13:41:21 +00:00
Make fast_sync=true by default, with more relaxed conditions
This commit is contained in:
parent
94194fea46
commit
5a8a9bfd69
@ -131,14 +131,13 @@ func (pool *BlockPool) IsCaughtUp() bool {
|
||||
pool.mtx.Unlock()
|
||||
|
||||
pool.peersMtx.Lock()
|
||||
numPeers := len(pool.peers)
|
||||
maxPeerHeight := 0
|
||||
for _, peer := range pool.peers {
|
||||
maxPeerHeight = MaxInt(maxPeerHeight, peer.height)
|
||||
}
|
||||
pool.peersMtx.Unlock()
|
||||
|
||||
return numPeers >= 3 && (height > 0 || time.Now().Sub(pool.startTime) > 30*time.Second) && (maxPeerHeight == 0 || height == maxPeerHeight)
|
||||
return (height > 0 || time.Now().Sub(pool.startTime) > 5*time.Second) && (maxPeerHeight == 0 || height == maxPeerHeight)
|
||||
}
|
||||
|
||||
// We need to see the second block's Validation to validate the first block.
|
||||
|
@ -56,7 +56,7 @@ func GetConfig(rootDir string) cfg.Config {
|
||||
mapConfig.SetDefault("moniker", "anonymous")
|
||||
mapConfig.SetDefault("node_laddr", "0.0.0.0:46656")
|
||||
// mapConfig.SetDefault("seeds", "goldenalchemist.chaintest.net:46656")
|
||||
mapConfig.SetDefault("fast_sync", false)
|
||||
mapConfig.SetDefault("fast_sync", true)
|
||||
mapConfig.SetDefault("skip_upnp", false)
|
||||
mapConfig.SetDefault("addrbook_file", rootDir+"/addrbook.json")
|
||||
mapConfig.SetDefault("priv_validator_file", rootDir+"/priv_validator.json")
|
||||
@ -77,7 +77,7 @@ proxy_app = "tcp://127.0.0.1:46658"
|
||||
moniker = "__MONIKER__"
|
||||
node_laddr = "0.0.0.0:46656"
|
||||
seeds = ""
|
||||
fast_sync = false
|
||||
fast_sync = true
|
||||
db_backend = "leveldb"
|
||||
log_level = "notice"
|
||||
rpc_laddr = "0.0.0.0:46657"
|
||||
|
Loading…
x
Reference in New Issue
Block a user