OSDN Git Service

init push for roll back in special case (#153)
[bytom/vapor.git] / netsync / consensusmgr / consensus_msg_test.go
index a535fd4..f429916 100644 (file)
@@ -26,7 +26,7 @@ func TestDecodeMessage(t *testing.T) {
                        msg: &BlockSignatureMsg{
                                BlockHash: [32]byte{0x01},
                                Signature: []byte{0x00},
-                               PubKey:    [64]byte{0x01},
+                               PubKey:    []byte{0x01},
                        },
                        msgType: blockSignatureByte,
                },
@@ -57,7 +57,7 @@ func TestBlockSignBroadcastMsg(t *testing.T) {
                BlockHash: [32]byte{0x01},
                Height:    100,
                Signature: []byte{0x00},
-               PubKey:    [64]byte{0x01},
+               PubKey:    []byte{0x01},
        }
        signatureBroadcastMsg := NewBroadcastMsg(NewBlockSignatureMsg(bc.NewHash(blockSignMsg.BlockHash), blockSignMsg.Height, blockSignMsg.Signature, blockSignMsg.PubKey), consensusChannel)
 
@@ -141,7 +141,7 @@ func TestBlockSignatureMsg(t *testing.T) {
                BlockHash: [32]byte{0x01},
                Height:    100,
                Signature: []byte{0x00},
-               PubKey:    [64]byte{0x01},
+               PubKey:    []byte{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
        }
        gotMsg := NewBlockSignatureMsg(bc.NewHash(msg.BlockHash), msg.Height, msg.Signature, msg.PubKey)