mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
8001cbbfd7
* fix: check asset supply * update begin blocker * add activation height and tests * fix: verify outgoing swap recipient * validate recipient address for outgoing swaps * update activation time * remove unused files Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com>
16 lines
429 B
Go
16 lines
429 B
Go
package bep3
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
// BeginBlocker on every block expires outdated atomic swaps and removes closed
|
|
// swap from long term storage (default storage time of 1 week)
|
|
func BeginBlocker(ctx sdk.Context, k Keeper) {
|
|
k.UpdateExpiredAtomicSwaps(ctx)
|
|
k.DeleteClosedAtomicSwapsFromLongtermStorage(ctx)
|
|
if ctx.BlockTime().After(SupplyLimitUpgradeTime) {
|
|
k.UpdateAssetSupplies(ctx)
|
|
}
|
|
}
|