KnownHead returns hash and number of current head block (maybe not in local chain)
()
| 308 | |
| 309 | // KnownHead returns hash and number of current head block (maybe not in local chain) |
| 310 | func (bc *BlockChain) KnownHead() (common.Hash, uint64) { |
| 311 | bc.knownHeadLock.RLock() |
| 312 | defer bc.knownHeadLock.RUnlock() |
| 313 | |
| 314 | return bc.knownHeadHash, bc.knownHeadNumber |
| 315 | } |
| 316 | |
| 317 | // SetKnownHead sets the known head block hash and number |
| 318 | func (bc *BlockChain) SetKnownHead(hash common.Hash, number uint64) { |
no outgoing calls
no test coverage detected