Skip to content

Commit

Permalink
fix: sequencer metadata update when snapshot is added (#1231)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Jan 20, 2025
1 parent 9340b15 commit 0d69dbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cmd/rollapp/sequencer/metadata/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,16 @@ func Cmd() *cobra.Command {
return
}

var seqMetadata sequencerutils.Metadata
var seqMetadata struct {
GasPrice string `json:"gas_price"`
}

b, err := os.ReadFile(metadataFilePath)
if err != nil {
pterm.Error.Println("failed to read metadata file: ", err)
return
}

err = json.Unmarshal(b, &seqMetadata)
if err != nil {
pterm.Error.Println("failed to unmarshal metadata file: ", err)
Expand Down
4 changes: 2 additions & 2 deletions utils/sequencer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ type Metadata struct {
Snapshots []*SnapshotInfo `json:"snapshots"`
// gas_price defines the value for each gas unit
// nolint:govet,staticcheck
GasPrice string `json:"gas_price"`
FeeDenom DenomMetadata `json:"fee_denom"`
GasPrice string `json:"gas_price"`
FeeDenom *DenomMetadata `json:"fee_denomm"`
}

type DenomMetadata struct {
Expand Down

0 comments on commit 0d69dbe

Please sign in to comment.