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
055f63fc
Commit
055f63fc
authored
Jan 24, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nit: Change interface names
parent
6092a2b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
garbage_channel_out.go
op-e2e/actions/garbage_channel_out.go
+5
-5
l2_batcher.go
op-e2e/actions/l2_batcher.go
+2
-2
channel_out.go
op-node/rollup/derive/channel_out.go
+3
-3
No files found.
op-e2e/actions/garbage_channel_out.go
View file @
055f63fc
...
@@ -42,8 +42,8 @@ type GarbageChannelCfg struct {
...
@@ -42,8 +42,8 @@ type GarbageChannelCfg struct {
malformRLP
bool
malformRLP
bool
}
}
// Writer
Api
is the interface shared between `zlib.Writer` and `gzip.Writer`
// Writer is the interface shared between `zlib.Writer` and `gzip.Writer`
type
Writer
Api
interface
{
type
Writer
interface
{
Close
()
error
Close
()
error
Flush
()
error
Flush
()
error
Reset
(
io
.
Writer
)
Reset
(
io
.
Writer
)
...
@@ -51,7 +51,7 @@ type WriterApi interface {
...
@@ -51,7 +51,7 @@ type WriterApi interface {
}
}
// Compile-time check for derive.ChannelOutApi interface implementation for the GarbageChannelOut type.
// Compile-time check for derive.ChannelOutApi interface implementation for the GarbageChannelOut type.
var
_
derive
.
ChannelOut
Api
=
(
*
GarbageChannelOut
)(
nil
)
var
_
derive
.
ChannelOut
Iface
=
(
*
GarbageChannelOut
)(
nil
)
// GarbageChannelOut is a modified `derive.ChannelOut` that can be configured to behave differently
// GarbageChannelOut is a modified `derive.ChannelOut` that can be configured to behave differently
// than the original
// than the original
...
@@ -63,7 +63,7 @@ type GarbageChannelOut struct {
...
@@ -63,7 +63,7 @@ type GarbageChannelOut struct {
rlpLength
int
rlpLength
int
// Compressor stage. Write input data to it
// Compressor stage. Write input data to it
compress
Writer
Api
compress
Writer
// post compression buffer
// post compression buffer
buf
bytes
.
Buffer
buf
bytes
.
Buffer
...
@@ -91,7 +91,7 @@ func NewGarbageChannelOut(cfg *GarbageChannelCfg) (*GarbageChannelOut, error) {
...
@@ -91,7 +91,7 @@ func NewGarbageChannelOut(cfg *GarbageChannelCfg) (*GarbageChannelOut, error) {
}
}
// Optionally use zlib or gzip compression
// Optionally use zlib or gzip compression
var
compress
Writer
Api
var
compress
Writer
if
cfg
.
useInvalidCompression
{
if
cfg
.
useInvalidCompression
{
compress
,
err
=
gzip
.
NewWriterLevel
(
&
c
.
buf
,
gzip
.
BestCompression
)
compress
,
err
=
gzip
.
NewWriterLevel
(
&
c
.
buf
,
gzip
.
BestCompression
)
}
else
{
}
else
{
...
...
op-e2e/actions/l2_batcher.go
View file @
055f63fc
...
@@ -61,7 +61,7 @@ type L2Batcher struct {
...
@@ -61,7 +61,7 @@ type L2Batcher struct {
l1Signer
types
.
Signer
l1Signer
types
.
Signer
l2ChannelOut
derive
.
ChannelOut
Api
l2ChannelOut
derive
.
ChannelOut
Iface
l2Submitting
bool
// when the channel out is being submitted, and not safe to write to without resetting
l2Submitting
bool
// when the channel out is being submitted, and not safe to write to without resetting
l2BufferedBlock
eth
.
BlockID
l2BufferedBlock
eth
.
BlockID
l2SubmittedBlock
eth
.
BlockID
l2SubmittedBlock
eth
.
BlockID
...
@@ -125,7 +125,7 @@ func (s *L2Batcher) ActL2BatchBuffer(t Testing) {
...
@@ -125,7 +125,7 @@ func (s *L2Batcher) ActL2BatchBuffer(t Testing) {
}
}
// Create channel if we don't have one yet
// Create channel if we don't have one yet
if
s
.
l2ChannelOut
==
nil
{
if
s
.
l2ChannelOut
==
nil
{
var
ch
derive
.
ChannelOut
Api
var
ch
derive
.
ChannelOut
Iface
if
s
.
l2BatcherCfg
.
GarbageCfg
!=
nil
{
if
s
.
l2BatcherCfg
.
GarbageCfg
!=
nil
{
ch
,
err
=
NewGarbageChannelOut
(
s
.
l2BatcherCfg
.
GarbageCfg
)
ch
,
err
=
NewGarbageChannelOut
(
s
.
l2BatcherCfg
.
GarbageCfg
)
}
else
{
}
else
{
...
...
op-node/rollup/derive/channel_out.go
View file @
055f63fc
...
@@ -17,8 +17,8 @@ import (
...
@@ -17,8 +17,8 @@ import (
var
ErrNotDepositTx
=
errors
.
New
(
"first transaction in block is not a deposit tx"
)
var
ErrNotDepositTx
=
errors
.
New
(
"first transaction in block is not a deposit tx"
)
var
ErrTooManyRLPBytes
=
errors
.
New
(
"batch would cause RLP bytes to go over limit"
)
var
ErrTooManyRLPBytes
=
errors
.
New
(
"batch would cause RLP bytes to go over limit"
)
// ChannelOut
Api
is the interface implemented by ChannelOut
// ChannelOut
Iface
is the interface implemented by ChannelOut
type
ChannelOut
Api
interface
{
type
ChannelOut
Iface
interface
{
ID
()
ChannelID
ID
()
ChannelID
Reset
()
error
Reset
()
error
AddBlock
(
block
*
types
.
Block
)
error
AddBlock
(
block
*
types
.
Block
)
error
...
@@ -29,7 +29,7 @@ type ChannelOutApi interface {
...
@@ -29,7 +29,7 @@ type ChannelOutApi interface {
}
}
// Compile-time check for ChannelOutApi interface implementation for the ChannelOut type.
// Compile-time check for ChannelOutApi interface implementation for the ChannelOut type.
var
_
ChannelOut
Api
=
(
*
ChannelOut
)(
nil
)
var
_
ChannelOut
Iface
=
(
*
ChannelOut
)(
nil
)
type
ChannelOut
struct
{
type
ChannelOut
struct
{
id
ChannelID
id
ChannelID
...
...
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