github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/inmem/params.go (about)

     1  package inmem
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  	"github.com/onflow/flow-go/state/protocol"
     6  )
     7  
     8  type Params struct {
     9  	enc EncodableParams
    10  }
    11  
    12  var _ protocol.GlobalParams = (*Params)(nil)
    13  
    14  func NewParams(enc EncodableParams) *Params {
    15  	return &Params{
    16  		enc: enc,
    17  	}
    18  }
    19  
    20  func (p Params) ChainID() flow.ChainID {
    21  	return p.enc.ChainID
    22  }
    23  
    24  func (p Params) SporkID() flow.Identifier {
    25  	return p.enc.SporkID
    26  }
    27  
    28  func (p Params) SporkRootBlockHeight() uint64 {
    29  	return p.enc.SporkRootBlockHeight
    30  }
    31  
    32  func (p Params) ProtocolVersion() uint {
    33  	return p.enc.ProtocolVersion
    34  }
    35  
    36  func (p Params) EpochCommitSafetyThreshold() uint64 {
    37  	return p.enc.EpochCommitSafetyThreshold
    38  }