SetCurrentHeader sets the current head header of the canonical chain.
(head *types.Header)
| 396 | |
| 397 | // SetCurrentHeader sets the current head header of the canonical chain. |
| 398 | func (hc *HeaderChain) SetCurrentHeader(head *types.Header) { |
| 399 | rawdb.WriteHeadHeaderHash(hc.chainDb, head.Hash()) |
| 400 | |
| 401 | hc.currentHeader.Store(head) |
| 402 | hc.currentHeaderHash = head.Hash() |
| 403 | } |
| 404 | |
| 405 | // DeleteCallback is a callback function that is called by SetHead before |
| 406 | // each header is deleted. |
no test coverage detected