From ec2131c8d3382db3762909a8e7d225be61bae230 Mon Sep 17 00:00:00 2001 From: PilkyuJung Date: Mon, 13 May 2019 19:23:32 +0900 Subject: [PATCH] core: move error variable to error.go (#19560) * move error variable to error.go * Update error.go Edit "Genesis" to "genesis" --- core/blockchain.go | 4 +--- core/error.go | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 52d1a7c29b..c93c71403e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -62,9 +62,7 @@ var ( blockWriteTimer = metrics.NewRegisteredTimer("chain/write", nil) blockPrefetchExecuteTimer = metrics.NewRegisteredTimer("chain/prefetch/executes", nil) - blockPrefetchInterruptMeter = metrics.NewRegisteredMeter("chain/prefetch/interrupts", nil) - - ErrNoGenesis = errors.New("Genesis not found in chain") + blockPrefetchInterruptMeter = metrics.NewRegisteredMeter("chain/prefetch/interrupts", nil) ) const ( diff --git a/core/error.go b/core/error.go index 410eca1e1e..cd4be3d705 100644 --- a/core/error.go +++ b/core/error.go @@ -32,4 +32,7 @@ var ( // ErrNonceTooHigh is returned if the nonce of a transaction is higher than the // next one expected based on the local chain. ErrNonceTooHigh = errors.New("nonce too high") + + // ErrNoGenesis is returned when there is no Genesis Block. + ErrNoGenesis = errors.New("genesis not found in chain") )