|
|
@ -25,7 +25,7 @@ func TestConstructResponseMessage(test *testing.T) { |
|
|
|
validator := p2p.Peer{Ip: "3", Port: "5"} |
|
|
|
validator := p2p.Peer{Ip: "3", Port: "5"} |
|
|
|
consensus := NewConsensus("1", "2", "0", []p2p.Peer{leader, validator}, leader) |
|
|
|
consensus := NewConsensus("1", "2", "0", []p2p.Peer{leader, validator}, leader) |
|
|
|
consensus.blockHash = [32]byte{} |
|
|
|
consensus.blockHash = [32]byte{} |
|
|
|
msg := consensus.constructResponseMessage(crypto.Ed25519Curve.Scalar()) |
|
|
|
msg := consensus.constructResponseMessage(consensus_proto.RESPONSE, crypto.Ed25519Curve.Scalar()) |
|
|
|
|
|
|
|
|
|
|
|
if len(msg) != 1+1+1+4+32+2+32+64 { |
|
|
|
if len(msg) != 1+1+1+4+32+2+32+64 { |
|
|
|
test.Errorf("Response message is not constructed in the correct size: %d", len(msg)) |
|
|
|
test.Errorf("Response message is not constructed in the correct size: %d", len(msg)) |
|
|
|