remove ack length limit (#6874)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Aditya
2020-07-29 10:46:44 +00:00
committed by GitHub
co-authored by Federico Kunze
parent 8b77cb442f
commit c7dab51192
2 changed files with 0 additions and 7 deletions
-3
View File
@@ -464,9 +464,6 @@ func (msg MsgAcknowledgement) ValidateBasic() error {
if len(msg.Proof) == 0 {
return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof")
}
if len(msg.Acknowledgement) > 100 {
return sdkerrors.Wrap(ErrAcknowledgementTooLong, "acknowledgement cannot exceed 100 bytes")
}
if msg.ProofHeight == 0 {
return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be > 0")
}
-4
View File
@@ -41,11 +41,9 @@ var (
disabledTimeout = uint64(0)
validPacketData = []byte("testdata")
unknownPacketData = []byte("unknown")
invalidAckData = []byte("123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")
packet = types.NewPacket(validPacketData, 1, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp)
unknownPacket = types.NewPacket(unknownPacketData, 0, portid, chanid, cpportid, cpchanid, timeoutHeight, timeoutTimestamp)
invalidAck = invalidAckData
emptyProof = []byte{}
invalidProofs1 = commitmentexported.Proof(nil)
@@ -471,7 +469,6 @@ func (suite *MsgTestSuite) TestMsgAcknowledgement() {
types.NewMsgAcknowledgement(packet, packet.GetData(), suite.proof, 1, emptyAddr),
types.NewMsgAcknowledgement(packet, packet.GetData(), emptyProof, 1, addr),
types.NewMsgAcknowledgement(unknownPacket, packet.GetData(), suite.proof, 1, addr),
types.NewMsgAcknowledgement(packet, invalidAck, suite.proof, 1, addr),
}
testCases := []struct {
@@ -484,7 +481,6 @@ func (suite *MsgTestSuite) TestMsgAcknowledgement() {
{testMsgs[2], false, "missing signer address"},
{testMsgs[3], false, "cannot submit an empty proof"},
{testMsgs[4], false, "invalid packet"},
{testMsgs[5], false, "invalid acknowledgement"},
}
for i, tc := range testCases {