cli: restart consensus service on USR2

Fix #1949. Also drop wallet from the ServerConfig since it's not used in any
meaningful way after this change.
This commit is contained in:
Roman Khimov 2022-07-26 22:41:52 +03:00
parent bf92966633
commit 5a7fa2d3df
6 changed files with 30 additions and 22 deletions

View file

@ -196,10 +196,6 @@ func newTestServerWithCustomCfg(t *testing.T, serverConfig ServerConfig, protoco
s, err := newServerFromConstructors(serverConfig, fakechain.NewFakeChainWithCustomCfg(protocolCfg), new(fakechain.FakeStateSync), zaptest.NewLogger(t),
newFakeTransp, newTestDiscovery)
require.NoError(t, err)
if serverConfig.Wallet != nil {
cons := new(fakeConsensus)
s.AddExtensibleHPService(cons, consensus.Category, cons.OnPayload, cons.OnTransaction)
}
t.Cleanup(s.discovery.Close)
return s
}