@@ -919,27 +919,27 @@ func TestVerifyDecideMessageCorrect(t *testing.T) {
919919}
920920
921921func TestValidateDecideMessageCorrect (t * testing.T ) {
922- _ , sp , privateKey , proofKeys := createDecideMessage (t , 20 , 10 , 10 , 10 , 10 )
922+ m , sp , privateKey , proofKeys := createDecideMessage (t , 20 , 10 , 10 , 10 , 10 )
923923 consensus := createConsensus (t , 9 , 10 , proofKeys )
924924
925925 consensus .SetLeader (& privateKey .PublicKey )
926926 bts , err := proto .Marshal (sp )
927927 assert .Nil (t , err )
928928
929- err = consensus .ValidateDecideMessage (bts )
929+ err = consensus .ValidateDecideMessage (bts , m . State )
930930 assert .Nil (t , err )
931931}
932932
933933func TestValidateDecideMessageUnknowParticipant (t * testing.T ) {
934- _ , sp , privateKey , proofKeys := createDecideMessage (t , 20 , 10 , 10 , 10 , 10 )
934+ m , sp , privateKey , proofKeys := createDecideMessage (t , 20 , 10 , 10 , 10 , 10 )
935935 consensus := createConsensus (t , 9 , 10 , proofKeys )
936936
937937 consensus .SetLeader (& privateKey .PublicKey )
938938 bts , err := proto .Marshal (sp )
939939 assert .Nil (t , err )
940940
941941 consensus = createConsensus (t , 9 , 10 , nil )
942- err = consensus .ValidateDecideMessage (bts )
942+ err = consensus .ValidateDecideMessage (bts , m . State )
943943 assert .NotNil (t , err )
944944}
945945
0 commit comments