Skip to content

Commit 76e01aa

Browse files
committed
core: clean up variables definition
1 parent a3bc74f commit 76e01aa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/chain_makers.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,12 @@ func makeHeader(chain consensus.ChainReader, parent *types.Block, state *state.S
256256
// chain. Depending on the full flag, if creates either a full block chain or a
257257
// header only chain.
258258
func newCanonical(engine consensus.Engine, n int, full bool) (ethdb.Database, *BlockChain, error) {
259-
// Initialize a fresh chain with only a genesis block
260-
gspec := new(Genesis)
261-
db := ethdb.NewMemDatabase()
262-
genesis := gspec.MustCommit(db)
259+
var (
260+
db = ethdb.NewMemDatabase()
261+
genesis = new(Genesis).MustCommit(db)
262+
)
263263

264+
// Initialize a fresh chain with only a genesis block
264265
blockchain, _ := NewBlockChain(db, nil, params.AllEthashProtocolChanges, engine, vm.Config{})
265266
// Create and inject the requested chain
266267
if n == 0 {

0 commit comments

Comments
 (0)