This commit is contained in:
Sina Mahmoodi 2025-04-02 12:32:39 +02:00 committed by lightclient
parent e4e4c5538b
commit 5348b311ca
No known key found for this signature in database
GPG key ID: 657913021EF45A6A

View file

@ -208,9 +208,10 @@ func genTestChain(t *testing.T) (*core.Genesis, []*types.Block, []types.Receipts
// exportChain creates a temporary era file with the given chain.
func exportChain(t *testing.T, genesis *core.Genesis, chain []*types.Block, receipts []types.Receipts) (string, string) {
tmpDir, err := os.MkdirTemp("", "era-test-*")
require.NoError(t, err)
const fileName = "test.era1"
var (
tmpDir = t.TempDir()
fileName = "test.era1"
)
tmpFile, err := os.Create(filepath.Join(tmpDir, fileName))
require.NoError(t, err)