mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-23 23:05:18 +00:00
fix: initialize issuance asset supplies at genesis (#634)
This commit is contained in:
parent
b356309d90
commit
b2eff063a8
@ -28,6 +28,15 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, supplyKeeper types.SupplyKeep
|
||||
k.SetAssetSupply(ctx, supply, supply.GetDenom())
|
||||
}
|
||||
|
||||
for _, asset := range gs.Params.Assets {
|
||||
if asset.RateLimit.Active {
|
||||
_, found := k.GetAssetSupply(ctx, asset.Denom)
|
||||
if !found {
|
||||
k.CreateNewAssetSupply(ctx, asset.Denom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ExportGenesis export genesis state for issuance module
|
||||
|
Loading…
Reference in New Issue
Block a user