github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/distribution/types/fee_pool.go (about)

     1  package types
     2  
     3  import (
     4  	"fmt"
     5  
     6  	sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
     7  )
     8  
     9  // FeePool is the struct of the global fee pool for distribution
    10  type FeePool struct {
    11  	CommunityPool sdk.SysCoins `json:"community_pool" yaml:"community_pool"` // pool for community funds yet to be spent
    12  }
    13  
    14  // InitialFeePool zero fee pool
    15  func InitialFeePool() FeePool {
    16  	return FeePool{
    17  		CommunityPool: sdk.SysCoins{},
    18  	}
    19  }
    20  
    21  // ValidateGenesis validates the fee pool for a genesis state
    22  func (f FeePool) ValidateGenesis() error {
    23  	if f.CommunityPool.IsAnyNegative() {
    24  		return fmt.Errorf("negative CommunityPool in distribution fee pool, is %v",
    25  			f.CommunityPool)
    26  	}
    27  	return nil
    28  }