consensus: add network magic to hash data

Consensus payload's hash now depends on the network node is operating
in.
This commit is contained in:
Evgenii Stratonikov 2020-06-26 18:27:18 +03:00
parent 270377637a
commit 857ced8230
4 changed files with 37 additions and 13 deletions

View file

@ -144,7 +144,7 @@ func (m *Message) decodePayload() error {
case CMDBlock:
p = block.New(m.Network)
case CMDConsensus:
p = &consensus.Payload{}
p = consensus.NewPayload(m.Network)
case CMDGetBlocks:
fallthrough
case CMDGetHeaders: