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
847d835d
Commit
847d835d
authored
Mar 07, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update struct to pointer
parent
0094f515
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
engine.go
engine/engine.go
+2
-2
engine.go
exchain/engine.go
+2
-2
engine.go
exchain/mockengine/engine.go
+2
-2
process.go
exchain/mockengine/process.go
+2
-2
attributes.go
op-node/rollup/derive/attributes.go
+1
-1
No files found.
engine/engine.go
View file @
847d835d
...
...
@@ -63,7 +63,7 @@ func (e *ExChainAPI) NewPayload(params exchain.PayloadParams) (exchain.Execution
if
err
!=
nil
{
return
exchain
.
ExecutionResult
{},
eth
.
PayloadInfo
{},
err
}
if
err
=
e
.
chain
.
SaveBlockData
(
result
.
Payload
,
&
result
.
Receipts
);
err
!=
nil
{
if
err
=
e
.
chain
.
SaveBlockData
(
result
.
Payload
,
result
.
Receipts
);
err
!=
nil
{
return
exchain
.
ExecutionResult
{},
eth
.
PayloadInfo
{},
err
}
hash
:=
wrapper
.
NewBlkWrapper
(
result
.
Payload
)
.
Hash
()
...
...
@@ -85,7 +85,7 @@ func (e *ExChainAPI) ProcessPayload(block *nebulav1.Block) error {
if
err
!=
nil
{
return
err
}
return
e
.
chain
.
SaveBlockData
(
result
.
Payload
,
&
result
.
Receipts
)
return
e
.
chain
.
SaveBlockData
(
result
.
Payload
,
result
.
Receipts
)
}
func
(
e
*
ExChainAPI
)
PayloadByNumber
(
ctx
context
.
Context
,
u
uint64
)
(
*
eth
.
ExecutionPayloadEnvelope
,
error
)
{
...
...
exchain/engine.go
View file @
847d835d
...
...
@@ -17,11 +17,11 @@ type PayloadParams struct {
Timestamp
uint64
Proposer
common
.
Address
L1Info
L1BlockInfo
Transactions
nebulav1
.
TransactionList
Transactions
*
nebulav1
.
TransactionList
Signer
Signer
}
type
ExecutionResult
struct
{
Payload
*
nebulav1
.
Block
Receipts
nebulav1
.
TransactionReceiptList
Receipts
*
nebulav1
.
TransactionReceiptList
}
exchain/mockengine/engine.go
View file @
847d835d
...
...
@@ -41,7 +41,7 @@ func (m MockEngine) NewPayload(params exchain.PayloadParams) (exchain.ExecutionR
result
:=
exchain
.
ExecutionResult
{
Payload
:
&
nebulav1
.
Block
{
Header
:
header
,
Transactions
:
&
params
.
Transactions
,
Transactions
:
params
.
Transactions
,
},
Receipts
:
receipts
,
}
...
...
@@ -56,7 +56,7 @@ func (m MockEngine) ProcessPayload(block *nebulav1.Block) (exchain.ExecutionResu
if
parent
.
Header
.
Height
+
1
!=
block
.
Header
.
Height
{
return
exchain
.
ExecutionResult
{},
fmt
.
Errorf
(
"invalid block height"
)
}
receipts
,
err
:=
m
.
ProcessTx
(
block
.
Header
,
*
block
.
Transactions
)
receipts
,
err
:=
m
.
ProcessTx
(
block
.
Header
,
block
.
Transactions
)
if
err
!=
nil
{
return
exchain
.
ExecutionResult
{},
err
}
...
...
exchain/mockengine/process.go
View file @
847d835d
...
...
@@ -8,8 +8,8 @@ import (
log
"github.com/sirupsen/logrus"
)
func
(
m
MockEngine
)
ProcessTx
(
header
*
nebulav1
.
BlockHeader
,
txs
nebulav1
.
TransactionList
)
(
nebulav1
.
TransactionReceiptList
,
error
)
{
receipts
:=
nebulav1
.
TransactionReceiptList
{
func
(
m
MockEngine
)
ProcessTx
(
header
*
nebulav1
.
BlockHeader
,
txs
*
nebulav1
.
TransactionList
)
(
*
nebulav1
.
TransactionReceiptList
,
error
)
{
receipts
:=
&
nebulav1
.
TransactionReceiptList
{
Receipts
:
make
([]
*
nebulav1
.
TransactionReceipt
,
0
),
}
for
_
,
tx
:=
range
txs
.
Txs
{
...
...
op-node/rollup/derive/attributes.go
View file @
847d835d
...
...
@@ -198,7 +198,7 @@ func (ba *FetchingAttributesBuilder) PreparePayloadAttributes(ctx context.Contex
},
Timestamp
:
nextL2Time
,
Proposer
:
common
.
Address
{},
Transactions
:
nebulav1
.
TransactionList
{
Transactions
:
&
nebulav1
.
TransactionList
{
Txs
:
txs
,
},
Signer
:
nil
,
...
...
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