diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/types/ascii.go | 9 | ||||
-rw-r--r-- | pkg/types/ascii_test.go | 7 |
2 files changed, 2 insertions, 14 deletions
diff --git a/pkg/types/ascii.go b/pkg/types/ascii.go index 7643ab1..f0a96ad 100644 --- a/pkg/types/ascii.go +++ b/pkg/types/ascii.go @@ -238,12 +238,6 @@ func (si *SigIdent) MarshalASCII(w io.Writer) error { } func (p *ConsistencyProof) MarshalASCII(w io.Writer) error { - if err := writeASCII(w, NewSize, strconv.FormatUint(p.NewSize, 10)); err != nil { - return fmt.Errorf("writeASCII: %v", err) - } - if err := writeASCII(w, OldSize, strconv.FormatUint(p.OldSize, 10)); err != nil { - return fmt.Errorf("writeASCII: %v", err) - } for _, hash := range p.Path { if err := writeASCII(w, ConsistencyPath, hex.EncodeToString(hash[:])); err != nil { return fmt.Errorf("writeASCII: %v", err) @@ -253,9 +247,6 @@ func (p *ConsistencyProof) MarshalASCII(w io.Writer) error { } func (p *InclusionProof) MarshalASCII(w io.Writer) error { - if err := writeASCII(w, TreeSize, strconv.FormatUint(p.TreeSize, 10)); err != nil { - return fmt.Errorf("writeASCII: %v", err) - } if err := writeASCII(w, LeafIndex, strconv.FormatUint(p.LeafIndex, 10)); err != nil { return fmt.Errorf("writeASCII: %v", err) } diff --git a/pkg/types/ascii_test.go b/pkg/types/ascii_test.go index 74a1e37..c3f9e98 100644 --- a/pkg/types/ascii_test.go +++ b/pkg/types/ascii_test.go @@ -176,8 +176,7 @@ func TestInclusionProofMarshalASCII(t *testing.T) { }, } wantBuf := bytes.NewBufferString(fmt.Sprintf( - "%s%s%d%s"+"%s%s%d%s"+"%s%s%x%s"+"%s%s%x%s", - TreeSize, Delim, 321, EOL, + "%s%s%d%s"+"%s%s%x%s"+"%s%s%x%s", LeafIndex, Delim, 123, EOL, InclusionPath, Delim, testBuffer32[:], EOL, InclusionPath, Delim, testBuffer32[:], EOL, @@ -203,9 +202,7 @@ func TestConsistencyProofMarshalASCII(t *testing.T) { }, } wantBuf := bytes.NewBufferString(fmt.Sprintf( - "%s%s%d%s"+"%s%s%d%s"+"%s%s%x%s"+"%s%s%x%s", - NewSize, Delim, 321, EOL, - OldSize, Delim, 123, EOL, + "%s%s%x%s"+"%s%s%x%s", ConsistencyPath, Delim, testBuffer32[:], EOL, ConsistencyPath, Delim, testBuffer32[:], EOL, )) |