2018-10-05 03:41:38 -07:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2018-12-06 16:22:24 -08:00
|
|
|
"fmt"
|
|
|
|
|
2018-10-05 03:41:38 -07:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
// zero fee pool
|
|
|
|
func InitialFeePool() FeePool {
|
|
|
|
return FeePool{
|
2019-01-16 13:38:05 -08:00
|
|
|
CommunityPool: sdk.DecCoins{},
|
2018-10-05 03:41:38 -07:00
|
|
|
}
|
|
|
|
}
|
2018-12-06 16:22:24 -08:00
|
|
|
|
|
|
|
// ValidateGenesis validates the fee pool for a genesis state
|
|
|
|
func (f FeePool) ValidateGenesis() error {
|
2019-02-15 07:33:23 -08:00
|
|
|
if f.CommunityPool.IsAnyNegative() {
|
2018-12-06 16:22:24 -08:00
|
|
|
return fmt.Errorf("negative CommunityPool in distribution fee pool, is %v",
|
|
|
|
f.CommunityPool)
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|