Skip to content

Commit 43d5c43

Browse files
authored
Revert "core/filtermaps: make ChainView thread safe (ethereum#31671)"
This reverts commit 4c9e7d1.
1 parent bf6da20 commit 43d5c43

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

core/filtermaps/chain_view.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
package filtermaps
1818

1919
import (
20-
"sync"
21-
2220
"github.com/ethereum/go-ethereum/common"
2321
"github.com/ethereum/go-ethereum/core/types"
2422
"github.com/ethereum/go-ethereum/log"
@@ -41,7 +39,6 @@ type blockchain interface {
4139
// of the underlying blockchain, it should only possess the block headers
4240
// and receipts up until the expected chain view head.
4341
type ChainView struct {
44-
lock sync.Mutex
4542
chain blockchain
4643
headNumber uint64
4744
hashes []common.Hash // block hashes starting backwards from headNumber until first canonical hash
@@ -150,9 +147,6 @@ func (cv *ChainView) extendNonCanonical() bool {
150147

151148
// blockHash returns the given block hash without doing the head number check.
152149
func (cv *ChainView) blockHash(number uint64) common.Hash {
153-
cv.lock.Lock()
154-
defer cv.lock.Unlock()
155-
156150
if number+uint64(len(cv.hashes)) <= cv.headNumber {
157151
hash := cv.chain.GetCanonicalHash(number)
158152
if !cv.extendNonCanonical() {

0 commit comments

Comments
 (0)