Skip to content

Commit aca5cfc

Browse files
committed
refactor: drop dag json support from pdp types
- because external dep github.com/filecoin-project/go-data-segment/merkletree doesn't support dagjson, and we don't use dagjson for anything
1 parent 8f53946 commit aca5cfc

4 files changed

Lines changed: 7 additions & 2342 deletions

File tree

commands/pdp/gen/main.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package main
55
import (
66
"os"
77

8-
jsg "github.com/alanshaw/dag-json-gen"
98
cbg "github.com/whyrusleeping/cbor-gen"
109

1110
"github.com/fil-forge/libforge/commands/pdp"
@@ -31,16 +30,11 @@ func main() {
3130
pdp.InfoAcceptedAggregate{},
3231
pdp.InfoOK{},
3332
}
34-
const (
35-
cborFile = "../cbor_gen.go"
36-
jsonFile = "../json_gen.go"
37-
)
33+
const cborFile = "../cbor_gen.go"
34+
// merkletree.ProofData implements CBOR but not dag-json, and the stack is
35+
// CBOR-only on the wire, so we don't generate dag-json codecs here.
3836
if err := cbg.WriteMapEncodersToFile(cborFile, "pdp", models...); err != nil {
3937
panic(err)
4038
}
41-
if err := jsg.WriteMapEncodersToFile(jsonFile, "pdp", models...); err != nil {
42-
panic(err)
43-
}
4439
tag(cborFile)
45-
tag(jsonFile)
4640
}

0 commit comments

Comments
 (0)