diff --git a/contracts/evoting/types/ballots.go b/contracts/evoting/types/ballots.go index c6855251e..26fd3eed8 100644 --- a/contracts/evoting/types/ballots.go +++ b/contracts/evoting/types/ballots.go @@ -43,12 +43,6 @@ type Ballot struct { // Unmarshal decodes the given string according to the format described in // "state of smart contract.md" func (b *Ballot) Unmarshal(marshalledBallot string, form Form) error { - if len(marshalledBallot) > form.BallotSize { - b.invalidate() - return fmt.Errorf("ballot has an unexpected size %d, expected <= %d", - len(marshalledBallot), form.BallotSize) - } - lines := strings.Split(marshalledBallot, "\n") b.SelectResultIDs = make([]ID, 0) diff --git a/contracts/evoting/types/ballots_test.go b/contracts/evoting/types/ballots_test.go index 47dd9828b..fd64d16db 100644 --- a/contracts/evoting/types/ballots_test.go +++ b/contracts/evoting/types/ballots_test.go @@ -111,10 +111,6 @@ func TestBallot_Unmarshal(t *testing.T) { require.Equal(t, expected.TextResultIDs, b.TextResultIDs) require.Equal(t, expected.TextResult, b.TextResult) - // with ballot too long - err = b.Unmarshal(ballot1+"x", form) - require.EqualError(t, err, "ballot has an unexpected size 102, expected <= 101") - // with line wrongly formatted err = b.Unmarshal("x", form) require.EqualError(t, err, "a line in the ballot has length != 3: x")