Skip to content

Commit

Permalink
To simplify the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Feb 18, 2022
1 parent 10f5ab1 commit b76f176
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/migration/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ func Version7Upgrade(repoPath string) (err error) {
// If maxFee value is String(10 FIL), unmarshal failure is expected
// If maxFee value is Number(10000000000000000000), need convert to FIL(10 FIL)
tmpCfg := tempCfg{}
if err := json.Unmarshal(data, &tmpCfg); err != nil {
migrateLog.Warn(err)
} else {
if err := json.Unmarshal(data, &tmpCfg); err == nil {
maxFee := types.MustParseFIL(fmt.Sprintf("%fattofil", tmpCfg.Mpool.MaxFee))
cfg.Mpool.MaxFee = maxFee
migrateLog.Info("convert mpool.maxFee from %v to %s", tmpCfg.Mpool.MaxFee, maxFee.String())
Expand Down

0 comments on commit b76f176

Please sign in to comment.