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
25b01cb2
Unverified
Commit
25b01cb2
authored
Mar 01, 2024
by
zhiqiangxu
Committed by
GitHub
Feb 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do sanity check first (#9689)
parent
22ebfb82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
channel_out.go
op-node/rollup/derive/channel_out.go
+5
-3
No files found.
op-node/rollup/derive/channel_out.go
View file @
25b01cb2
...
@@ -224,6 +224,10 @@ func (co *SingularChannelOut) OutputFrame(w *bytes.Buffer, maxSize uint64) (uint
...
@@ -224,6 +224,10 @@ func (co *SingularChannelOut) OutputFrame(w *bytes.Buffer, maxSize uint64) (uint
// BlockToSingularBatch transforms a block into a batch object that can easily be RLP encoded.
// BlockToSingularBatch transforms a block into a batch object that can easily be RLP encoded.
func
BlockToSingularBatch
(
rollupCfg
*
rollup
.
Config
,
block
*
types
.
Block
)
(
*
SingularBatch
,
*
L1BlockInfo
,
error
)
{
func
BlockToSingularBatch
(
rollupCfg
*
rollup
.
Config
,
block
*
types
.
Block
)
(
*
SingularBatch
,
*
L1BlockInfo
,
error
)
{
if
len
(
block
.
Transactions
())
==
0
{
return
nil
,
nil
,
fmt
.
Errorf
(
"block %v has no transactions"
,
block
.
Hash
())
}
opaqueTxs
:=
make
([]
hexutil
.
Bytes
,
0
,
len
(
block
.
Transactions
()))
opaqueTxs
:=
make
([]
hexutil
.
Bytes
,
0
,
len
(
block
.
Transactions
()))
for
i
,
tx
:=
range
block
.
Transactions
()
{
for
i
,
tx
:=
range
block
.
Transactions
()
{
if
tx
.
Type
()
==
types
.
DepositTxType
{
if
tx
.
Type
()
==
types
.
DepositTxType
{
...
@@ -235,9 +239,7 @@ func BlockToSingularBatch(rollupCfg *rollup.Config, block *types.Block) (*Singul
...
@@ -235,9 +239,7 @@ func BlockToSingularBatch(rollupCfg *rollup.Config, block *types.Block) (*Singul
}
}
opaqueTxs
=
append
(
opaqueTxs
,
otx
)
opaqueTxs
=
append
(
opaqueTxs
,
otx
)
}
}
if
len
(
block
.
Transactions
())
==
0
{
return
nil
,
nil
,
fmt
.
Errorf
(
"block %v has no transactions"
,
block
.
Hash
())
}
l1InfoTx
:=
block
.
Transactions
()[
0
]
l1InfoTx
:=
block
.
Transactions
()[
0
]
if
l1InfoTx
.
Type
()
!=
types
.
DepositTxType
{
if
l1InfoTx
.
Type
()
!=
types
.
DepositTxType
{
return
nil
,
nil
,
ErrNotDepositTx
return
nil
,
nil
,
ErrNotDepositTx
...
...
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