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

Method genesis

sqlchain/chain.go:354–364  ·  view source on GitHub ↗
(b *types.Block)

Source from the content-addressed store, hash-verified

352}
353
354func (c *Chain) genesis(b *types.Block) (err error) {
355 if b == nil {
356 err = errors.New("genesis block not provided")
357 return
358 }
359 if err = b.VerifyAsGenesis(); err != nil {
360 err = errors.Wrap(err, "initialize chain state")
361 return
362 }
363 return c.pushBlock(b)
364}
365
366// pushBlock pushes the signed block header to extend the current main chain.
367func (c *Chain) pushBlock(b *types.Block) (err error) {

Callers 1

NewChainWithContextFunction · 0.80

Calls 3

pushBlockMethod · 0.95
VerifyAsGenesisMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected