Commit 4c55210f authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #2063 from ethereum-optimism/fix/better-user-error-sequencer-forwarding

l2geth: better error message for proxying user txs
parents 4d7c5457 949916f8
---
'@eth-optimism/l2geth': patch
---
Add a better error message for when the sequencer url is not configured when proxying user requests to the sequencer for `eth_sendRawTransaction` when running as a verifier/replica
......@@ -50,7 +50,10 @@ import (
"github.com/tyler-smith/go-bip39"
)
var errOVMUnsupported = errors.New("OVM: Unsupported RPC Method")
var (
errOVMUnsupported = errors.New("OVM: Unsupported RPC Method")
errNoSequencerURL = errors.New("sequencer transaction forwarding not configured")
)
const (
// defaultDialTimeout is default duration the service will wait on
......@@ -1678,7 +1681,11 @@ func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encod
}
if s.b.IsVerifier() {
client, err := dialSequencerClientWithTimeout(ctx, s.b.SequencerClientHttp())
sequencerURL := s.b.SequencerClientHttp()
if sequencerURL == "" {
return common.Hash{}, errNoSequencerURL
}
client, err := dialSequencerClientWithTimeout(ctx, sequencerURL)
if err != nil {
return common.Hash{}, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment