Add TimeIotaMs to export GenesisFile (#6510)
* Add TimeIotaMs to export GenesisFile. * include changelog entry * Fix changelog. * add test for exporting consensus params Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Alexander Bezobchuk
mergify[bot]
parent
51c35f4dce
commit
7c0fa69748
+6
-3
@@ -75,8 +75,9 @@ func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *
|
||||
doc.Validators = validators
|
||||
doc.ConsensusParams = &tmtypes.ConsensusParams{
|
||||
Block: tmtypes.BlockParams{
|
||||
MaxBytes: cp.Block.MaxBytes,
|
||||
MaxGas: cp.Block.MaxGas,
|
||||
MaxBytes: cp.Block.MaxBytes,
|
||||
MaxGas: cp.Block.MaxGas,
|
||||
TimeIotaMs: doc.ConsensusParams.Block.TimeIotaMs,
|
||||
},
|
||||
Evidence: tmtypes.EvidenceParams{
|
||||
MaxAgeNumBlocks: cp.Evidence.MaxAgeNumBlocks,
|
||||
@@ -92,7 +93,7 @@ func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(string(sdk.MustSortJSON(encoded)))
|
||||
cmd.Println(string(sdk.MustSortJSON(encoded)))
|
||||
return nil
|
||||
},
|
||||
}
|
||||
@@ -100,6 +101,8 @@ func ExportCmd(ctx *Context, cdc codec.JSONMarshaler, appExporter AppExporter) *
|
||||
cmd.Flags().Int64(flagHeight, -1, "Export state from a particular height (-1 means latest height)")
|
||||
cmd.Flags().Bool(flagForZeroHeight, false, "Export state to start at height zero (perform preproccessing)")
|
||||
cmd.Flags().StringSlice(flagJailWhitelist, []string{}, "List of validators to not jail state export")
|
||||
cmd.SetOut(cmd.OutOrStdout())
|
||||
cmd.SetErr(cmd.OutOrStderr())
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user