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
7bbe25dd
Commit
7bbe25dd
authored
Mar 15, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix golangci nits
⚙
parent
e7f4ece7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
channel_manager_test.go
op-batcher/batcher/channel_manager_test.go
+8
-4
No files found.
op-batcher/batcher/channel_manager_test.go
View file @
7bbe25dd
...
@@ -101,7 +101,8 @@ func TestChannelManagerNextTxData(t *testing.T) {
...
@@ -101,7 +101,8 @@ func TestChannelManagerNextTxData(t *testing.T) {
// Set the pending channel
// Set the pending channel
// The nextTxData function should still return EOF
// The nextTxData function should still return EOF
// since the pending channel has no frames
// since the pending channel has no frames
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
err
=
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
require
.
NoError
(
t
,
err
)
returnedTxData
,
err
=
m
.
nextTxData
()
returnedTxData
,
err
=
m
.
nextTxData
()
require
.
ErrorIs
(
t
,
err
,
io
.
EOF
)
require
.
ErrorIs
(
t
,
err
,
io
.
EOF
)
require
.
Equal
(
t
,
txData
{},
returnedTxData
)
require
.
Equal
(
t
,
txData
{},
returnedTxData
)
...
@@ -161,7 +162,8 @@ func TestClearChannelManager(t *testing.T) {
...
@@ -161,7 +162,8 @@ func TestClearChannelManager(t *testing.T) {
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
// Make sure there is a channel builder
// Make sure there is a channel builder
m
.
ensurePendingChannel
(
l1BlockID
)
err
=
m
.
ensurePendingChannel
(
l1BlockID
)
require
.
NoError
(
t
,
err
)
require
.
NotNil
(
t
,
m
.
pendingChannel
)
require
.
NotNil
(
t
,
m
.
pendingChannel
)
require
.
Equal
(
t
,
0
,
len
(
m
.
confirmedTransactions
))
require
.
Equal
(
t
,
0
,
len
(
m
.
confirmedTransactions
))
...
@@ -214,7 +216,8 @@ func TestChannelManagerTxConfirmed(t *testing.T) {
...
@@ -214,7 +216,8 @@ func TestChannelManagerTxConfirmed(t *testing.T) {
// Let's add a valid pending transaction to the channel manager
// Let's add a valid pending transaction to the channel manager
// So we can demonstrate that TxConfirmed's correctness
// So we can demonstrate that TxConfirmed's correctness
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
err
:=
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
require
.
NoError
(
t
,
err
)
channelID
:=
m
.
pendingChannel
.
ID
()
channelID
:=
m
.
pendingChannel
.
ID
()
frame
:=
frameData
{
frame
:=
frameData
{
data
:
[]
byte
{},
data
:
[]
byte
{},
...
@@ -262,7 +265,8 @@ func TestChannelManagerTxFailed(t *testing.T) {
...
@@ -262,7 +265,8 @@ func TestChannelManagerTxFailed(t *testing.T) {
// Let's add a valid pending transaction to the channel
// Let's add a valid pending transaction to the channel
// manager so we can demonstrate correctness
// manager so we can demonstrate correctness
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
err
:=
m
.
ensurePendingChannel
(
eth
.
BlockID
{})
require
.
NoError
(
t
,
err
)
channelID
:=
m
.
pendingChannel
.
ID
()
channelID
:=
m
.
pendingChannel
.
ID
()
frame
:=
frameData
{
frame
:=
frameData
{
data
:
[]
byte
{},
data
:
[]
byte
{},
...
...
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