Skip to content

Commit 74e4756

Browse files
authored
fix: Copy directory (ava-labs/coreth#1376) (#1846)
1 parent 87a6bcc commit 74e4756

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/blockchain_ext_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,10 +2076,9 @@ func ReexecCorruptedStateTest(t *testing.T, create ReexecTestFunc) {
20762076
blockchain.Stop()
20772077

20782078
// Restart blockchain with existing state
2079-
restartedBlockchain, err := create(chainDB, gspec, chain[1].Hash(), tempDir, 4096)
2080-
if err != nil {
2081-
t.Fatalf("failed to restart blockchain: %v", err)
2082-
}
2079+
newDir := copyFlatDir(t, tempDir) // avoid file lock
2080+
restartedBlockchain, err := create(chainDB, gspec, chain[1].Hash(), newDir, 4096)
2081+
require.NoError(t, err)
20832082
defer restartedBlockchain.Stop()
20842083

20852084
// We should be able to accept the remaining blocks

0 commit comments

Comments
 (0)