MCPcopy
hub / github.com/canopy-network/canopy / LoadMaxBlockSize

Method LoadMaxBlockSize

controller/controller.go:344–354  ·  view source on GitHub ↗

LoadMaxBlockSize() gets the max block size from the state

()

Source from the content-addressed store, hash-verified

342
343// LoadMaxBlockSize() gets the max block size from the state
344func (c *Controller) LoadMaxBlockSize() int {
345 // load the maximum block size from the nested chain FSM
346 params, _ := c.FSM.GetParamsCons()
347 // if the parameters are empty
348 if params == nil {
349 // return 0 as the 'max'
350 return 0
351 }
352 // return the max block size as set by the governance param
353 return int(params.BlockSize)
354}
355
356// LoadLastCommitTime() gets a timestamp from the most recent Quorum Block
357func (c *Controller) LoadLastCommitTime(height uint64) time.Time {

Callers 1

HandlePeerBlockMethod · 0.95

Calls 1

GetParamsConsMethod · 0.80

Tested by

no test coverage detected