private ConsensusPayload MakePayload(ConsensusMessage message) { message.ViewNumber = ViewNumber; return(new ConsensusPayload { Version = Version, PrevHash = PrevHash, ChainHash = ChainHash, BlockIndex = BlockIndex, ValidatorIndex = (ushort)MyIndex, Timestamp = Timestamp, Data = message.ToArray() }); }
private ConsensusPayload MakeSignedPayload(ConsensusMessage message) { message.ViewNumber = ViewNumber; ConsensusPayload payload = new ConsensusPayload { Version = Version, PrevHash = PrevHash, ChainHash = blockchain.ChainHash, BlockIndex = BlockIndex, ValidatorIndex = (ushort)MyIndex, Timestamp = Timestamp, Data = message.ToArray() }; SignPayload(payload); return(payload); }