Skip to content

Commit a26e2ac

Browse files
fix: null pointer when error occurs (#1239)
1 parent e808675 commit a26e2ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eth/backend.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ func New(stack *node.Node, config *Config) (*Ethereum, error) {
225225
newBlockChainFunc = core.NewMultitenantBlockChain
226226
}
227227
eth.blockchain, err = newBlockChainFunc(chainDb, cacheConfig, chainConfig, eth.engine, vmConfig, eth.shouldPreserve, &config.TxLookupLimit)
228+
if err != nil {
229+
return nil, err
230+
}
228231

229232
// Quorum
230233
eth.blockchain.SetSaveRevertReason(config.SaveRevertReason)
231234

232-
if err != nil {
233-
return nil, err
234-
}
235235
// Rewind the chain in case of an incompatible config upgrade.
236236
if compat, ok := genesisErr.(*params.ConfigCompatError); ok {
237237
log.Warn("Rewinding chain to upgrade configuration", "err", compat)

0 commit comments

Comments
 (0)