Skip to content

Commit

Permalink
undo digest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimjbrettj committed Jul 15, 2021
1 parent e036a26 commit a3cf779
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions dot/digest/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (h *Handler) handleScheduledChange(d *types.ConsensusDigest, header *types.
return nil
}

var sc types.GrandpaScheduledChange
var sc *types.GrandpaScheduledChange
err = scale.Unmarshal(d.Data[1:], &sc)
if err != nil {
return err
Expand Down Expand Up @@ -338,7 +338,7 @@ func (h *Handler) handleForcedChange(d *types.ConsensusDigest, header *types.Hea
return errors.New("already have forced change scheduled")
}

var fc types.GrandpaForcedChange
var fc *types.GrandpaForcedChange
err := scale.Unmarshal(d.Data[1:], &fc)
if err != nil {
return err
Expand Down Expand Up @@ -371,7 +371,7 @@ func (h *Handler) handlePause(d *types.ConsensusDigest) error {
return err
}

var p types.GrandpaPause
var p *types.GrandpaPause
err = scale.Unmarshal(d.Data[1:], &p)
if err != nil {
return err
Expand All @@ -392,7 +392,7 @@ func (h *Handler) handleResume(d *types.ConsensusDigest) error {
return err
}

var p types.GrandpaResume
var p *types.GrandpaResume
err = scale.Unmarshal(d.Data[1:], &p)
if err != nil {
return err
Expand Down Expand Up @@ -428,7 +428,7 @@ func (h *Handler) handleBABEOnDisabled(d *types.ConsensusDigest, _ *types.Header
}

func (h *Handler) handleNextEpochData(d *types.ConsensusDigest, header *types.Header) error {
var od types.NextEpochData
var od *types.NextEpochData
err := scale.Unmarshal(d.Data[1:], &od)
if err != nil {
return err
Expand All @@ -452,7 +452,7 @@ func (h *Handler) handleNextEpochData(d *types.ConsensusDigest, header *types.He
}

func (h *Handler) handleNextConfigData(d *types.ConsensusDigest, header *types.Header) error {
var od types.NextConfigData
var od *types.NextConfigData
err := scale.Unmarshal(d.Data[1:], &od)
if err != nil {
return err
Expand Down
16 changes: 8 additions & 8 deletions dot/types/consensus_digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type GrandpaScheduledChange struct {

// Encode returns a SCALE encoded GrandpaScheduledChange with first type byte
func (sc *GrandpaScheduledChange) Encode() ([]byte, error) {
d, err := scale.Marshal(*sc)
d, err := scale.Marshal(sc)
if err != nil {
return nil, err
}
Expand All @@ -44,7 +44,7 @@ type GrandpaForcedChange struct {

// Encode returns a SCALE encoded GrandpaForcedChange with first type byte
func (fc *GrandpaForcedChange) Encode() ([]byte, error) {
d, err := scale.Marshal(*fc)
d, err := scale.Marshal(fc)
if err != nil {
return nil, err
}
Expand All @@ -59,7 +59,7 @@ type GrandpaOnDisabled struct {

// Encode returns a SCALE encoded GrandpaOnDisabled with first type byte
func (od *GrandpaOnDisabled) Encode() ([]byte, error) {
d, err := scale.Marshal(*od)
d, err := scale.Marshal(od)
if err != nil {
return nil, err
}
Expand All @@ -74,7 +74,7 @@ type GrandpaPause struct {

// Encode returns a SCALE encoded GrandpaPause with first type byte
func (p *GrandpaPause) Encode() ([]byte, error) {
d, err := scale.Marshal(*p)
d, err := scale.Marshal(p)
if err != nil {
return nil, err
}
Expand All @@ -89,7 +89,7 @@ type GrandpaResume struct {

// Encode returns a SCALE encoded GrandpaResume with first type byte
func (r *GrandpaResume) Encode() ([]byte, error) {
d, err := scale.Marshal(*r)
d, err := scale.Marshal(r)
if err != nil {
return nil, err
}
Expand All @@ -106,7 +106,7 @@ type NextEpochData struct {

// Encode returns a SCALE encoded NextEpochData with first type byte
func (d *NextEpochData) Encode() ([]byte, error) {
enc, err := scale.Marshal(*d)
enc, err := scale.Marshal(d)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -134,7 +134,7 @@ type BABEOnDisabled struct {

// Encode returns a SCALE encoded BABEOnDisabled with first type byte
func (od *BABEOnDisabled) Encode() ([]byte, error) {
d, err := scale.Marshal(*od)
d, err := scale.Marshal(od)
if err != nil {
return nil, err
}
Expand All @@ -152,7 +152,7 @@ type NextConfigData struct {

// Encode returns a SCALE encoded NextConfigData with first type byte
func (d *NextConfigData) Encode() ([]byte, error) {
enc, err := scale.Marshal(*d)
enc, err := scale.Marshal(d)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a3cf779

Please sign in to comment.