Exit Initial Sync Early (#12659)

* add check

* fix test
This commit is contained in:
Nishant Das
2023-07-26 08:38:25 +08:00
committed by GitHub
parent 2b40c44879
commit 113172d8aa
2 changed files with 14 additions and 0 deletions

View File

@@ -31,6 +31,14 @@ func TestService_Constants(t *testing.T) {
func TestService_InitStartStop(t *testing.T) {
hook := logTest.NewGlobal()
resetFlags := flags.Get()
flags.Init(&flags.GlobalFlags{
MinimumSyncPeers: 1,
})
defer func() {
flags.Init(resetFlags)
}()
tests := []struct {
name string
assert func()