aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/genesis_test.go')
-rw-r--r--core/genesis_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/genesis_test.go b/core/genesis_test.go
index de843e05a..16958eac3 100644
--- a/core/genesis_test.go
+++ b/core/genesis_test.go
@@ -105,6 +105,16 @@ func TestSetupGenesis(t *testing.T) {
wantConfig: params.TestnetChainConfig,
},
{
+ name: "custom block in DB, genesis == taipei",
+ fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
+ customg.MustCommit(db)
+ return SetupGenesisBlock(db, DefaultTaipeiGenesisBlock())
+ },
+ wantErr: &GenesisMismatchError{Stored: customghash, New: params.TaipeiGenesisHash},
+ wantHash: params.TaipeiGenesisHash,
+ wantConfig: params.TaipeiChainConfig,
+ },
+ {
name: "custom block in DB, genesis == yilan",
fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) {
customg.MustCommit(db)