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

Function loadIrreHash

blockproducer/storage.go:407–419  ·  view source on GitHub ↗
(st xi.Storage)

Source from the content-addressed store, hash-verified

405}
406
407func loadIrreHash(st xi.Storage) (irre hash.Hash, err error) {
408 var hex string
409 // Load last irreversible block hash
410 if err = st.Reader().QueryRow(
411 `SELECT "hash" FROM "irreversible" WHERE "id"=0`,
412 ).Scan(&hex); err != nil {
413 return
414 }
415 if err = hash.Decode(&irre, hex); err != nil {
416 return
417 }
418 return
419}
420
421func loadTxPool(st xi.Storage) (txPool map[hash.Hash]pi.Transaction, err error) {
422 var (

Callers 1

loadDatabaseFunction · 0.85

Calls 4

DecodeFunction · 0.92
QueryRowMethod · 0.80
ReaderMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected