network: raise MPTRoot broadcast priority

It can affect consensus process.
This commit is contained in:
Roman Khimov 2020-08-10 12:23:49 +03:00
parent ab7a69bfec
commit 92f8cee6cd

View file

@ -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)))
}