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

Method debugDumpHeaderDiff

controller/block.go:713–721  ·  view source on GitHub ↗

debugDumpHeaderDiff() logs the differences between the candidate and the constructed

(candidate, compare *lib.BlockHeader)

Source from the content-addressed store, hash-verified

711
712// debugDumpHeaderDiff() logs the differences between the candidate and the constructed
713func (c *Controller) debugDumpHeaderDiff(candidate, compare *lib.BlockHeader) {
714 cand, _ := lib.MarshalJSONIndentString(candidate)
715 comp, _ := lib.MarshalJSONIndentString(compare)
716 exported, _ := c.FSM.ExportState()
717 state, _ := lib.MarshalJSONIndentString(exported)
718 c.log.Errorf("Candidate:\n:%s", cand)
719 c.log.Errorf("Compare:\n:%s", comp)
720 c.log.Errorf("State:\n:%s", state)
721}

Callers 1

ApplyAndValidateBlockMethod · 0.95

Calls 3

MarshalJSONIndentStringFunction · 0.92
ExportStateMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected