From f9fc6015677dedf5d83418c8443283b00e5b3ea0 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Fri, 13 Nov 2020 17:30:12 +0100 Subject: [PATCH] fix: truncate genesis file before generating --- node/modules/testing/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/modules/testing/genesis.go b/node/modules/testing/genesis.go index fa9e0cff7..a3d25e36a 100644 --- a/node/modules/testing/genesis.go +++ b/node/modules/testing/genesis.go @@ -81,7 +81,7 @@ func MakeGenesis(outFile, genesisTemplate string) func(bs dtypes.ChainBlockstore 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 { return nil, err }