diff options
Diffstat (limited to 'core/genesis_test.go')
-rw-r--r-- | core/genesis_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/genesis_test.go b/core/genesis_test.go index 9db96c271..c083ed9aa 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 == yilan", + fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { + customg.MustCommit(db) + return SetupGenesisBlock(db, DefaultYilanGenesisBlock()) + }, + wantErr: &GenesisMismatchError{Stored: customghash, New: params.YilanGenesisHash}, + wantHash: params.YilanGenesisHash, + wantConfig: params.YilanChainConfig, + }, + { name: "compatible config in DB", fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { oldcustomg.MustCommit(db) |