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
aa276c08
Unverified
Commit
aa276c08
authored
Sep 28, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-e2e: Use a synchronous approach to get transactions into the pool in TestBigL2Txs
parent
78e681b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
l2_batcher_test.go
op-e2e/actions/l2_batcher_test.go
+2
-2
l2_engine.go
op-e2e/actions/l2_engine.go
+7
-0
No files found.
op-e2e/actions/l2_batcher_test.go
View file @
aa276c08
...
@@ -464,7 +464,7 @@ func TestBigL2Txs(gt *testing.T) {
...
@@ -464,7 +464,7 @@ func TestBigL2Txs(gt *testing.T) {
Value
:
big
.
NewInt
(
0
),
Value
:
big
.
NewInt
(
0
),
Data
:
data
,
Data
:
data
,
})
})
require
.
NoError
(
gt
,
cl
.
SendTransaction
(
t
.
Ctx
(),
tx
)
)
engine
.
ActSendTx
(
t
,
tx
)
engine
.
ActL2IncludeTx
(
dp
.
Addresses
.
Alice
)(
t
)
engine
.
ActL2IncludeTx
(
dp
.
Addresses
.
Alice
)(
t
)
}
}
sequencer
.
ActL2EndBlock
(
t
)
sequencer
.
ActL2EndBlock
(
t
)
...
@@ -504,7 +504,7 @@ func TestBigL2Txs(gt *testing.T) {
...
@@ -504,7 +504,7 @@ func TestBigL2Txs(gt *testing.T) {
if
miner
.
l1GasPool
.
Gas
()
<
tx
.
Gas
()
{
// fill the L1 block with batcher txs until we run out of gas
if
miner
.
l1GasPool
.
Gas
()
<
tx
.
Gas
()
{
// fill the L1 block with batcher txs until we run out of gas
break
break
}
}
log
.
Info
(
"including batcher tx"
,
"nonce"
,
tx
)
log
.
Info
(
"including batcher tx"
,
"nonce"
,
tx
.
Nonce
()
)
miner
.
IncludeTx
(
t
,
tx
)
miner
.
IncludeTx
(
t
,
tx
)
txs
=
txs
[
1
:
]
txs
=
txs
[
1
:
]
}
}
...
...
op-e2e/actions/l2_engine.go
View file @
aa276c08
...
@@ -168,6 +168,13 @@ func (e *L2Engine) ActL2RPCFail(t Testing) {
...
@@ -168,6 +168,13 @@ func (e *L2Engine) ActL2RPCFail(t Testing) {
e
.
failL2RPC
=
errors
.
New
(
"mock L2 RPC error"
)
e
.
failL2RPC
=
errors
.
New
(
"mock L2 RPC error"
)
}
}
// ActSendTx adds a transaction to the tx pool and ensures any required promotion to the pending tx queue is complete
// before returning.
func
(
e
*
L2Engine
)
ActSendTx
(
t
Testing
,
tx
*
types
.
Transaction
)
{
err
:=
errors
.
Join
(
e
.
eth
.
TxPool
()
.
Add
([]
*
types
.
Transaction
{
tx
},
true
,
true
)
...
)
require
.
NoError
(
t
,
err
,
"Add tx to pool"
)
}
// ActL2IncludeTx includes the next transaction from the given address in the block that is being built
// ActL2IncludeTx includes the next transaction from the given address in the block that is being built
func
(
e
*
L2Engine
)
ActL2IncludeTx
(
from
common
.
Address
)
Action
{
func
(
e
*
L2Engine
)
ActL2IncludeTx
(
from
common
.
Address
)
Action
{
return
func
(
t
Testing
)
{
return
func
(
t
Testing
)
{
...
...
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