Skip to content

Commit

Permalink
Removing file writers from compare blocks script
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBger committed Jan 25, 2024
1 parent c47d696 commit f0391d8
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions cmd/tools/compare/tools_compare_blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"fmt"
"io"
"os"
"reflect"
"strconv"
"sync"
Expand Down Expand Up @@ -372,28 +371,6 @@ func Compare(reference proto.Message, current proto.Message, includeUnknownField

//todo: manage better output off differences
if diff := r.Diff(c).Render(); diff != "" {
referenceWriter, err := os.Create("/Users/arnaudberger/t/reference.json")
if err != nil {
fmt.Println(err)
}
currentWriter, err := os.Create("/Users/arnaudberger/t/current.json")
if err != nil {
fmt.Println(err)
}

_, err = referenceWriter.WriteString(referenceAsJSON)
if err != nil {
fmt.Println(err)
}
_, err = currentWriter.WriteString(currentAsJSON)
if err != nil {
fmt.Println(err)
}

referenceWriter.Close()
currentWriter.Close()

panic("boum" /*referenceMsg.Get(referenceMsg.Descriptor().Fields().ByName("slot")).Uint()*/)
differences = append(differences, diff)
}

Expand Down

0 comments on commit f0391d8

Please sign in to comment.