Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
a2252447
Commit
a2252447
authored
Mar 20, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ticket op-batcher concurrent transaction handling
parent
6dc52517
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
driver.go
op-batcher/batcher/driver.go
+2
-4
No files found.
op-batcher/batcher/driver.go
View file @
a2252447
...
...
@@ -339,9 +339,9 @@ func (l *BatchSubmitter) loop() {
// SendTransaction creates & submits a transaction to the batch inbox address with the given `data`.
// It currently uses the underlying `txmgr` to handle transaction sending & price management.
// This is a blocking method. It should not be called concurrently.
// TODO: where to put concurrent transaction handling logic.
func
(
l
*
BatchSubmitter
)
SendTransaction
(
ctx
context
.
Context
,
data
[]
byte
)
(
*
types
.
Receipt
,
error
)
{
// Do the gas estimation offline if specified
// A value of 0 will cause the [txmgr] to estimate the gas limit.
var
gas
uint64
if
l
.
OfflineGasEstimation
{
intrinsicGas
,
err
:=
core
.
IntrinsicGas
(
data
,
nil
,
false
,
true
,
true
,
false
)
...
...
@@ -357,9 +357,7 @@ func (l *BatchSubmitter) SendTransaction(ctx context.Context, data []byte) (*typ
TxData
:
data
,
From
:
l
.
From
,
ChainID
:
l
.
Rollup
.
L1ChainID
,
// Explicit instantiation here so we can make a note that a gas
// limit of 0 will cause the [txmgr] to estimate the gas limit.
GasLimit
:
gas
,
GasLimit
:
gas
,
})
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to create tx: %w"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment