|
|
|
@ -6,6 +6,7 @@ import ( |
|
|
|
|
"github.com/simple-rules/harmony-benchmark/crypto" |
|
|
|
|
"github.com/simple-rules/harmony-benchmark/crypto/pki" |
|
|
|
|
"github.com/simple-rules/harmony-benchmark/p2p" |
|
|
|
|
consensus_proto "github.com/simple-rules/harmony-benchmark/proto/consensus" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
func TestConstructAnnounceMessage(test *testing.T) { |
|
|
|
@ -41,7 +42,7 @@ func TestConstructChallengeMessage(test *testing.T) { |
|
|
|
|
consensus.bitmap.SetKey(leaderPubKey, true) |
|
|
|
|
consensus.bitmap.SetKey(validatorPubKey, true) |
|
|
|
|
|
|
|
|
|
msg := consensus.constructChallengeMessage() |
|
|
|
|
msg := consensus.constructChallengeMessage(consensus_proto.CHALLENGE) |
|
|
|
|
|
|
|
|
|
if len(msg) != 1+1+1+4+32+2+33+33+32+64 { |
|
|
|
|
test.Errorf("Annouce message is not constructed in the correct size: %d", len(msg)) |
|
|
|
|