0g-chain/x/bep3/abci.go
Denali Marsh 6c68e41758
[R4R] bep3 module audit revisions (#505)
* most audit revisions

* remove expected income

* update begin block spec

* filter queryAtomicSwaps, add queryAssetSupplies

* update old address

* update test

* Remove legacy method

* remove legacy comment

* address PR comments

* IsValid for SwapDirection, SwapStatus

* fix rng logging

* query asset supplies

* return [64]byte from rng

* remove cross chain field from MsgCreateAtomicSwap

* move swap filtering to querier

* rename Limit field to SupplyLimit
2020-05-12 13:15:38 -07:00

13 lines
345 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)
}