File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ type HeaderChain struct {
54
54
chainDb ctxcdb.Database
55
55
genesisHeader * types.Header
56
56
57
- currentHeader atomic.Value // Current head of the header chain (may be above the block chain!)
58
- currentHeaderHash common.Hash // Hash of the current head of the header chain (prevent recomputing all the time)
57
+ currentHeader atomic.Pointer [types. Header ] // Current head of the header chain (maybe above the block chain!)
58
+ currentHeaderHash common.Hash // Hash of the current head of the header chain (prevent recomputing all the time)
59
59
60
60
headerCache * lru.Cache [common.Hash , * types.Header ]
61
61
tdCache * lru.Cache [common.Hash , * big.Int ] // most recent total difficulties
@@ -560,7 +560,7 @@ func (hc *HeaderChain) GetCanonicalHash(number uint64) common.Hash {
560
560
// CurrentHeader retrieves the current head header of the canonical chain. The
561
561
// header is retrieved from the HeaderChain's internal cache.
562
562
func (hc * HeaderChain ) CurrentHeader () * types.Header {
563
- return hc .currentHeader .Load ().( * types. Header )
563
+ return hc .currentHeader .Load ()
564
564
}
565
565
566
566
// SetCurrentHeader sets the current head header of the canonical chain.
You can’t perform that action at this time.
0 commit comments