Skip to content

Commit

Permalink
rabbit reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Nov 10, 2023
1 parent 4991d1a commit 2902b42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions go/enclave/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions go/enclave/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2902b42

Please sign in to comment.