MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / sprint

Method sprint

blockproducer/branch.go:259–274  ·  view source on GitHub ↗
(from uint32)

Source from the content-addressed store, hash-verified

257}
258
259func (b *branch) sprint(from uint32) (buff string) {
260 var nodes = b.head.fetchNodeList(from)
261 for i, v := range nodes {
262 if i == 0 {
263 var p = v.parent
264 buff += fmt.Sprintf("* #%d:%d %s {%d}",
265 p.height, p.count, p.hash.Short(4), p.txCount)
266 }
267 if d := v.height - v.parent.height; d > 1 {
268 buff += fmt.Sprintf(" <-- (skip %d blocks)", d-1)
269 }
270 buff += fmt.Sprintf(" <-- #%d:%d %s {%d}",
271 v.height, v.count, v.hash.Short(4), v.txCount)
272 }
273 return
274}

Callers 1

statMethod · 0.80

Calls 2

fetchNodeListMethod · 0.80
ShortMethod · 0.80

Tested by

no test coverage detected