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
4a65bb9e
Unverified
Commit
4a65bb9e
authored
Dec 08, 2022
by
Håvard Anda Estensen
Committed by
GitHub
Dec 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Mark functions test helpers (#4237)
parent
ec266098
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
0 deletions
+5
-0
polling_test.go
op-node/client/polling_test.go
+1
-0
calldata_source_test.go
op-node/rollup/derive/calldata_source_test.go
+1
-0
fuzz_parsers_test.go
op-node/rollup/derive/fuzz_parsers_test.go
+1
-0
start_test.go
op-node/rollup/sync/start_test.go
+1
-0
assertions.go
op-node/testutils/assertions.go
+1
-0
No files found.
op-node/client/polling_test.go
View file @
4a65bb9e
...
...
@@ -197,6 +197,7 @@ func TestPollingClientClose(t *testing.T) {
}
func
requireChansEqual
(
t
*
testing
.
T
,
chans
[]
chan
*
types
.
Header
,
root
common
.
Hash
)
{
t
.
Helper
()
for
_
,
ch
:=
range
chans
{
header
:=
<-
ch
require
.
Equal
(
t
,
root
,
header
.
Root
)
...
...
op-node/rollup/derive/calldata_source_test.go
View file @
4a65bb9e
...
...
@@ -29,6 +29,7 @@ type testTx struct {
}
func
(
tx
*
testTx
)
Create
(
t
*
testing
.
T
,
signer
types
.
Signer
,
rng
*
rand
.
Rand
)
*
types
.
Transaction
{
t
.
Helper
()
out
,
err
:=
types
.
SignNewTx
(
tx
.
author
,
signer
,
&
types
.
DynamicFeeTx
{
ChainID
:
signer
.
ChainID
(),
Nonce
:
0
,
...
...
op-node/rollup/derive/fuzz_parsers_test.go
View file @
4a65bb9e
...
...
@@ -141,6 +141,7 @@ var (
// EncodeDepositOpaqueDataV0 performs ABI encoding to create the opaque data field of the deposit event.
func
EncodeDepositOpaqueDataV0
(
t
*
testing
.
T
,
mint
*
big
.
Int
,
value
*
big
.
Int
,
gasLimit
uint64
,
isCreation
bool
,
data
[]
byte
)
[]
byte
{
t
.
Helper
()
// in OptimismPortal.sol:
// bytes memory opaqueData = abi.encodePacked(msg.value, _value, _gasLimit, _isCreation, _data);
// Geth does not support abi.encodePacked, so we emulate it here by slicing of the padding from the individual elements
...
...
op-node/rollup/sync/start_test.go
View file @
4a65bb9e
...
...
@@ -22,6 +22,7 @@ var _ L2Chain = (*testutils.FakeChainSource)(nil)
// - The actual L1 chain is the New L1 chain
// - Both heads are at the tip of their respective chains
func
(
c
*
syncStartTestCase
)
generateFakeL2
(
t
*
testing
.
T
)
(
*
testutils
.
FakeChainSource
,
rollup
.
Genesis
)
{
t
.
Helper
()
log
:=
testlog
.
Logger
(
t
,
log
.
LvlError
)
chain
:=
testutils
.
NewFakeChainSource
([]
string
{
c
.
L1
,
c
.
NewL1
},
[]
string
{
c
.
L2
},
int
(
c
.
GenesisL1Num
),
log
)
chain
.
SetL2Head
(
len
(
c
.
L2
)
-
1
)
...
...
op-node/testutils/assertions.go
View file @
4a65bb9e
...
...
@@ -14,6 +14,7 @@ func BigEqual(a, b *big.Int) bool {
}
func
RequireBigEqual
(
t
*
testing
.
T
,
exp
,
actual
*
big
.
Int
)
{
t
.
Helper
()
if
!
BigEqual
(
exp
,
actual
)
{
t
.
Fatalf
(
"expected %s to be equal to %s"
,
exp
.
String
(),
actual
.
String
())
}
...
...
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