From f127c29aaaea2ebf1f38283d83686f6c653590a9 Mon Sep 17 00:00:00 2001 From: Yumin Xia Date: Fri, 20 Sep 2019 13:45:05 -0700 Subject: [PATCH] upgrade2update1 (#382) --- types/const.go | 3 +++ x/account/manager/manager.go | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/types/const.go b/types/const.go index 38e90530..d09fbdee 100644 --- a/types/const.go +++ b/types/const.go @@ -169,4 +169,7 @@ const ( // TendermintValidatorPower - every validator has const power in tendermint engine. TendermintValidatorPower = 1000 + + // Upgrade2Update1 - adjust minimum registration fee. + Upgrade2Update1Height = 30000 ) diff --git a/x/account/manager/manager.go b/x/account/manager/manager.go index e50dc11c..c904d80f 100644 --- a/x/account/manager/manager.go +++ b/x/account/manager/manager.go @@ -45,7 +45,11 @@ func (accManager AccountManager) RegisterAccount( if err != nil { return err } - if accParams.RegisterFee.IsGT(registerFee) { + minRegFee := accParams.RegisterFee + if ctx.BlockHeight() >= linotypes.Upgrade2Update1Height { + minRegFee = linotypes.NewCoinFromInt64(10000) + } + if minRegFee.IsGT(registerFee) { return types.ErrRegisterFeeInsufficient() }