Skip to content

Commit

Permalink
Fix custom marshal: no pointer receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Sep 7, 2023
1 parent b204f92 commit 5b82e96
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 2,005 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/json_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ type ChainStateWithProposalTypes struct {
// custom marshal and unmarshal functions for the chainstate that convert proposals to/from the auxiliary type with type info

// transform the ChainState into a ChainStateWithProposalTypes by adding type info to the proposals
func (c *ChainState) MarshalJson() ([]byte, error) {
func (c ChainState) MarshalJson() ([]byte, error) {
fmt.Println("Custom marshal is called")
chainStateWithProposalTypes := ChainStateWithProposalTypes{
ChainState: *c,
ChainState: c,
}
if c.Proposals != nil {
proposalsWithTypes := make(map[uint]ProposalAndType)
Expand Down
4 changes: 0 additions & 4 deletions tests/e2e/trace_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import (
"github.com/google/go-cmp/cmp"
)

// tests unmarshalling and marshalling a ChainState object
func TestMarshal(t *testing.T) {
}

// define some sets of steps to test with
var proposalSubmissionSteps = []Step{
{submitTextProposalAction{Title: "Proposal 1", Description: "Description 1"}, State{}},
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/tracehandler_testdata/changeover.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/e2e/tracehandler_testdata/democracy.json

Large diffs are not rendered by default.

Loading

0 comments on commit 5b82e96

Please sign in to comment.