network/consensus: always process dBFT messages as high priority
Move category definition from consensus to payload, consensus service is the one of its kind (HP), so network.Server can be adjusted accordingly.
This commit is contained in:
parent
ff93a680eb
commit
9b0ea2c21b
8 changed files with 20 additions and 26 deletions
|
@ -151,7 +151,7 @@ func newTestChain(t *testing.T, f func(*config.Config), run bool) (*core.Blockch
|
|||
TimePerBlock: serverConfig.TimePerBlock,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
netSrv.AddExtensibleHPService(cons, consensus.Category, cons.OnPayload, cons.OnTransaction)
|
||||
netSrv.AddConsensusService(cons, cons.OnPayload, cons.OnTransaction)
|
||||
go netSrv.Start(make(chan error, 1))
|
||||
errCh := make(chan error, 2)
|
||||
rpcServer := rpcsrv.New(chain, cfg.ApplicationConfiguration.RPC, netSrv, nil, logger, errCh)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue