diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 65ddd98f7d..9a06d043f8 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -198,9 +198,6 @@ func NewEnclave( sharedSecretProcessor := components.NewSharedSecretProcessor(mgmtContractLib, attestationProvider, storage, logger) blockchain := ethblockchain.NewEthBlockchain(big.NewInt(config.ObscuroChainID), registry, storage, logger) - if err != nil { - logger.Crit("unable to init the eth blockchain construct", log.ErrKey, err) - } mempool, err := txpool.NewTxPool(blockchain) if err != nil { logger.Crit("unable to init eth tx pool", log.ErrKey, err) diff --git a/go/enclave/txpool/txpool.go b/go/enclave/txpool/txpool.go index b09f84f800..44fb2dba6e 100644 --- a/go/enclave/txpool/txpool.go +++ b/go/enclave/txpool/txpool.go @@ -36,6 +36,10 @@ func NewTxPool(blockchain *ethblockchain.EthBlockchain) (*TxPool, error) { // Start starts the pool // can only be started after t.blockchain has at least one block inside func (t *TxPool) Start() error { + if t.pool != nil { + return fmt.Errorf("tx pool already started") + } + memp, err := gethtxpool.New(new(big.Int).SetUint64(0), t.blockchain, []gethtxpool.SubPool{t.legacyPool}) if err != nil { return fmt.Errorf("unable to init geth tx pool - %w", err)