diff --git a/eth/downloader/testchain_test.go b/eth/downloader/testchain_test.go index 8fa2e83413..1bf895c0ee 100644 --- a/eth/downloader/testchain_test.go +++ b/eth/downloader/testchain_test.go @@ -210,7 +210,7 @@ func newTestBlockchain(blocks []*types.Block) *core.BlockChain { testBlockchains[head] = new(testBlockchain) } tbc := testBlockchains[head] - testBlockchainsLock.Unlock() + defer testBlockchainsLock.Unlock() // Ensure that the database is generated tbc.gen.Do(func() {