View definition

func GetBlock(db Database, hash Hash, number uint64) *Block

Defined in


GetBlock retrieves an entire block corresponding to the hash, assembling it back from the stored header and body. If either the header or body could not be retrieved nil is returned.

Note, due to concurrent download of header and block body the header and thus canonical hash can be stored in the database but the body data not (yet).

GetBlock is referenced in 2 repositories