les: fix data races in tests (#23457)

This commit is contained in:
gary rong
2021-08-25 17:56:25 +08:00
committed by GitHub
parent fe2f153b55
commit 83ad92c421
8 changed files with 48 additions and 76 deletions

View File

@ -28,7 +28,6 @@ import (
"github.com/ethereum/go-ethereum/core/forkid"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/les/flowcontrol"
"github.com/ethereum/go-ethereum/light"
@ -408,7 +407,7 @@ func (h *serverHandler) broadcastLoop() {
defer headSub.Unsubscribe()
var (
lastHead *types.Header
lastHead = h.blockchain.CurrentHeader()
lastTd = common.Big0
)
for {