mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
19 lines
330 B
Go
19 lines
330 B
Go
|
package bep3
|
||
|
|
||
|
import (
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
)
|
||
|
|
||
|
// BeginBlocker runs at the start of every block
|
||
|
func BeginBlocker(ctx sdk.Context, k Keeper) {
|
||
|
err := k.UpdateExpiredAtomicSwaps(ctx)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
err = k.DeleteClosedAtomicSwapsFromLongtermStorage(ctx)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|