Merge pull request #4851 from filecoin-project/fix/daemon-test-mode-restart

Truncate genesis file before generating
This commit is contained in:
Łukasz Magiera 2020-11-16 16:13:33 +01:00 committed by GitHub
commit 49d3bb9497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ func MakeGenesis(outFile, genesisTemplate string) func(bs dtypes.ChainBlockstore
fmt.Printf("GENESIS MINER ADDRESS: t0%d\n", genesis2.MinerStart) fmt.Printf("GENESIS MINER ADDRESS: t0%d\n", genesis2.MinerStart)
f, err := os.OpenFile(outFile, os.O_CREATE|os.O_WRONLY, 0644) f, err := os.OpenFile(outFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil { if err != nil {
return nil, err return nil, err
} }