mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00
Fix typo and align log messages (#241)
* Fix typo and align log messages * Align some variable names with rest of the program * [log] Fix log formatting and change log level * Fix comment Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
parent
00aba3115f
commit
fd58362a42
@ -22,10 +22,10 @@ func (cmad CheckReissuanceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu
|
||||
if sdk.MsgTypeURL(msg) == "/planetmintgo.dao.MsgReissueRDDLProposal" {
|
||||
MsgProposal, ok := msg.(*daotypes.MsgReissueRDDLProposal)
|
||||
if ok {
|
||||
util.GetAppLogger().Debug(ctx, "ante handler - received re-issuance roposal")
|
||||
util.GetAppLogger().Debug(ctx, "ante handler - received re-issuance proposal")
|
||||
isValid := cmad.dk.IsValidReIssuanceProposal(ctx, MsgProposal)
|
||||
if !isValid {
|
||||
util.GetAppLogger().Info(ctx, "ante handler: rejected re-issuance proposal")
|
||||
util.GetAppLogger().Info(ctx, "ante handler - rejected re-issuance proposal")
|
||||
return ctx, errorsmod.Wrapf(daotypes.ErrReissuanceProposal, "error during CheckTx or ReCheckTx")
|
||||
}
|
||||
util.GetAppLogger().Debug(ctx, "ante handler - accepted re-issuance proposal")
|
||||
|
@ -359,7 +359,7 @@ func initAppConfig(clientCtx client.Context) (string, interface{}) {
|
||||
type CustomAppConfig struct {
|
||||
serverconfig.Config
|
||||
PlmntConfig planetmintconfig.Config
|
||||
RPCConfig lib.Config
|
||||
LibConfig lib.Config
|
||||
}
|
||||
|
||||
// Optionally allow the chain developer to overwrite the SDK's default
|
||||
@ -379,16 +379,16 @@ func initAppConfig(clientCtx client.Context) (string, interface{}) {
|
||||
// In simapp, we set the min gas prices to 0.
|
||||
srvCfg.MinGasPrices = "0stake"
|
||||
|
||||
plmntCfg := planetmintconfig.GetConfig()
|
||||
plmntCfg.SetRoot(clientCtx.HomeDir)
|
||||
plmntConfig := planetmintconfig.GetConfig()
|
||||
plmntConfig.SetRoot(clientCtx.HomeDir)
|
||||
|
||||
rpcCfg := lib.GetConfig()
|
||||
rpcCfg.SetChainID(clientCtx.ChainID)
|
||||
libConfig := lib.GetConfig()
|
||||
libConfig.SetChainID(clientCtx.ChainID)
|
||||
|
||||
customAppConfig := CustomAppConfig{
|
||||
Config: *srvCfg,
|
||||
PlmntConfig: *plmntCfg,
|
||||
RPCConfig: *rpcCfg,
|
||||
PlmntConfig: *plmntConfig,
|
||||
LibConfig: *libConfig,
|
||||
}
|
||||
customAppTemplate := serverconfig.DefaultConfigTemplate + planetmintconfig.DefaultConfigTemplate
|
||||
|
||||
|
@ -94,7 +94,7 @@ func DefaultConfig() *Config {
|
||||
DistributionAddrInv: "vjTyRN2G42Yq3T5TJBecHj1dF1xdhKF89hKV4HJN3uXxUbaVGVR76hAfVRQqQCovWaEpar7G5qBBprFG",
|
||||
DistributionAddrDAO: "vjU8eMzU3JbUWZEpVANt2ePJuPWSPixgjiSj2jDMvkVVQQi2DDnZuBRVX4Ygt5YGBf5zvTWCr1ntdqYH",
|
||||
DistributionAddrPop: "vjTvXCFSReRsZ7grdsAreRR12KuKpDw8idueQJK9Yh1BYS7ggAqgvCxCgwh13KGK6M52y37HUmvr4GdD",
|
||||
DistributionEpochs: 17640, // CometBFT epochs of 5s equate 1 day (12*60*24) + 15 min (15*24) to wait for confirmations on the re-issuance
|
||||
DistributionEpochs: 17640, // CometBFT epochs of 5s equate 1 day (12*60*24) + 30 min (12*30) to wait for confirmations on the re-issuance
|
||||
ReIssuanceEpochs: 17280, // CometBFT epochs of 5s equate 1 day (12*60*24)
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ func buildSignBroadcastTx(goCtx context.Context, loggingContext string, sendingV
|
||||
GetAppLogger().Error(ctx, loggingContext+" build unsigned tx failed: "+err.Error())
|
||||
return
|
||||
}
|
||||
GetAppLogger().Info(ctx, loggingContext+" unsigned tx: "+txJSON)
|
||||
GetAppLogger().Debug(ctx, loggingContext+" unsigned tx: "+txJSON)
|
||||
_, err = lib.BroadcastTxWithFileLock(addr, msg)
|
||||
if err != nil {
|
||||
GetAppLogger().Error(ctx, loggingContext+" broadcast tx failed: "+err.Error())
|
||||
|
@ -1,6 +1,7 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/store/prefix"
|
||||
@ -140,8 +141,8 @@ func (k Keeper) ComputeReIssuanceValue(ctx sdk.Context, startHeight int64, endHe
|
||||
popReIssuanceString := GetReissuanceAsStringValue(obj.GetHeight())
|
||||
amount, err := util.RDDLTokenStringToUint(popReIssuanceString)
|
||||
if err != nil {
|
||||
util.GetAppLogger().Error(ctx, "unable to compute PoP re-issuance value (firstPop %u, Pops height %u, current height %u)",
|
||||
startHeight, obj.GetHeight(), endHeight)
|
||||
util.GetAppLogger().Error(ctx, fmt.Sprintf("unable to compute PoP re-issuance value (firstPop %d, Pop height %d, current height %d)",
|
||||
startHeight, obj.GetHeight(), endHeight))
|
||||
continue
|
||||
}
|
||||
if firstIncludedPop == 0 {
|
||||
@ -150,8 +151,8 @@ func (k Keeper) ComputeReIssuanceValue(ctx sdk.Context, startHeight int64, endHe
|
||||
lastIncludedPop = obj.GetHeight()
|
||||
overallAmount += amount
|
||||
} else {
|
||||
util.GetAppLogger().Debug(ctx, "the PoP is not part of the reissuance (firstPop %u, Pops height %u, current height %u)",
|
||||
startHeight, obj.GetHeight(), endHeight)
|
||||
util.GetAppLogger().Debug(ctx, fmt.Sprintf("the PoP is not part of the reissuance (firstPop %d, Pop height %d, current height %d)",
|
||||
startHeight, obj.GetHeight(), endHeight))
|
||||
if obj.GetHeight()+2*popEpochs > endHeight {
|
||||
break
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user