Skip to content

Commit

Permalink
chain: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Jul 9, 2024
1 parent 129a1da commit 0485e06
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chain/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type ApplyUpdate struct {
State consensus.State // post-application
}

// MarshalJSON implements the json.Marshaler interface.
func (au ApplyUpdate) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
ApplyUpdate consensus.ApplyUpdate `json:"applyUpdate"`
Expand All @@ -40,6 +41,7 @@ func (au ApplyUpdate) MarshalJSON() ([]byte, error) {
})
}

// UnmarshalJSON implements the json.Unmarshaler interface.
func (au *ApplyUpdate) UnmarshalJSON(b []byte) error {
var v struct {
ApplyUpdate consensus.ApplyUpdate `json:"applyUpdate"`
Expand All @@ -66,6 +68,7 @@ type RevertUpdate struct {
State consensus.State // post-reversion, i.e. pre-application
}

// MarshalJSON implements the json.Marshaler interface.
func (ru RevertUpdate) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
RevertUpdate consensus.RevertUpdate `json:"revertUpdate"`
Expand All @@ -78,6 +81,7 @@ func (ru RevertUpdate) MarshalJSON() ([]byte, error) {
})
}

// UnmarshalJSON implements the json.Unmarshaler interface.
func (ru *RevertUpdate) UnmarshalJSON(b []byte) error {
var v struct {
RevertUpdate consensus.RevertUpdate `json:"revertUpdate"`
Expand Down

0 comments on commit 0485e06

Please sign in to comment.