mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-04-04 15:55:23 +00:00 
			
		
		
		
	 5fc85f10a6
			
		
	
	
		5fc85f10a6
		
			
		
	
	
	
	
		
			
			* feat: use only module account for bep3 txs * wip: add time-based supply limits * add tests and sims * update genesis tests * fix migration, committee tests * update migrations * fix: set previous block time in begin block * update store decoder * add additional bep3 params to committee * revert incorrect rebase changes * add migration test * address review comments
		
			
				
	
	
		
			14 lines
		
	
	
		
			381 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			381 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.UpdateTimeBasedSupplyLimits(ctx)
 | |
| 	k.UpdateExpiredAtomicSwaps(ctx)
 | |
| 	k.DeleteClosedAtomicSwapsFromLongtermStorage(ctx)
 | |
| }
 |