Skip to content

Commit

Permalink
adjustments to codegen and manual fixes to Union types
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Norden authored and Ian Norden committed Aug 10, 2021
1 parent 3f6b398 commit 9ec5abc
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 13 deletions.
3 changes: 3 additions & 0 deletions gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ func accumulateStateDataStructures(ts *schema.TypeSystem) {
| Receipt "rct"
| Account "state"
| Bytes "storage"
| Log "log"
} representation keyed
# Child union type used to handle the case where the node is stored directly in the parent node because it is smaller
Expand All @@ -280,12 +281,14 @@ func accumulateStateDataStructures(ts *schema.TypeSystem) {
"Receipt",
"Account",
"Bytes",
"Log",
},
schema.SpawnUnionRepresentationKeyed(map[string]schema.TypeName{
"tx": "Transaction",
"rct": "Receipt",
"state": "Account",
"storage": "Bytes",
"log": "Log",
}),
))
ts.Accumulate(schema.SpawnUnion("Child",
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/ipfs/go-cid v0.0.7
github.com/ipld/go-ipld-prime v0.10.0
github.com/multiformats/go-multihash v0.0.15
golang.org/dl v0.0.0-20210805175753-70f86bf65abd // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/dl v0.0.0-20210805175753-70f86bf65abd h1:zTi7rOU7NMmBInGr/IFQrDXBgYZ2VCO7BlylmxGpQTs=
golang.org/dl v0.0.0-20210805175753-70f86bf65abd/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ=
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
93 changes: 80 additions & 13 deletions ipldsch_satisfaction.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions ipldsch_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9ec5abc

Please sign in to comment.