From 92f8cee6cd6ebf11a130f572d4fdc1042ac520ae Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 10 Aug 2020 12:23:49 +0300 Subject: [PATCH] network: raise MPTRoot broadcast priority It can affect consensus process. --- pkg/network/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/network/server.go b/pkg/network/server.go index af79c964e..c7836f933 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -852,7 +852,10 @@ func (s *Server) handleNewPayload(item cache.Hashable) { case *state.MPTRoot: s.stateCache.Add(p) msg := s.MkMsg(CMDStateRoot, p) - s.broadcastMessage(msg) + // Stalling on broadcast here would mean delaying commit which + // is not good for consensus. MPTRoot is being generated once + // per block, so it shouldn't be a problem. + s.broadcastHPMessage(msg) default: s.log.Warn("unknown item type", zap.String("type", fmt.Sprintf("%T", p))) }