GetHeaderByNumber retrieves a block header from the database by number, caching it (associated with its hash) if found.
(number uint64)
| 1912 | // GetHeaderByNumber retrieves a block header from the database by number, |
| 1913 | // caching it (associated with its hash) if found. |
| 1914 | func (bc *BlockChain) GetHeaderByNumber(number uint64) *types.Header { |
| 1915 | return bc.hc.GetHeaderByNumber(number) |
| 1916 | } |
| 1917 | |
| 1918 | // Config retrieves the blockchain's chain configuration. |
| 1919 | func (bc *BlockChain) Config() *configs.ChainConfig { return bc.chainConfig } |