Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张蕾
Geth-Modification
Commits
bce5c467
Unverified
Commit
bce5c467
authored
Aug 23, 2023
by
rjl493456442
Committed by
GitHub
Aug 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/catalyst: disable full payload when not in dev mode (#27921)
eth/catalyst: only enable full payload in dev mode
parent
0c6bbeb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
api.go
eth/catalyst/api.go
+5
-5
simulated_beacon.go
eth/catalyst/simulated_beacon.go
+1
-1
No files found.
eth/catalyst/api.go
View file @
bce5c467
...
@@ -395,7 +395,7 @@ func (api *ConsensusAPI) ExchangeTransitionConfigurationV1(config engine.Transit
...
@@ -395,7 +395,7 @@ func (api *ConsensusAPI) ExchangeTransitionConfigurationV1(config engine.Transit
// GetPayloadV1 returns a cached payload by id.
// GetPayloadV1 returns a cached payload by id.
func
(
api
*
ConsensusAPI
)
GetPayloadV1
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutableData
,
error
)
{
func
(
api
*
ConsensusAPI
)
GetPayloadV1
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutableData
,
error
)
{
data
,
err
:=
api
.
getPayload
(
payloadID
)
data
,
err
:=
api
.
getPayload
(
payloadID
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -404,17 +404,17 @@ func (api *ConsensusAPI) GetPayloadV1(payloadID engine.PayloadID) (*engine.Execu
...
@@ -404,17 +404,17 @@ func (api *ConsensusAPI) GetPayloadV1(payloadID engine.PayloadID) (*engine.Execu
// GetPayloadV2 returns a cached payload by id.
// GetPayloadV2 returns a cached payload by id.
func
(
api
*
ConsensusAPI
)
GetPayloadV2
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
func
(
api
*
ConsensusAPI
)
GetPayloadV2
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
return
api
.
getPayload
(
payloadID
)
return
api
.
getPayload
(
payloadID
,
false
)
}
}
// GetPayloadV3 returns a cached payload by id.
// GetPayloadV3 returns a cached payload by id.
func
(
api
*
ConsensusAPI
)
GetPayloadV3
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
func
(
api
*
ConsensusAPI
)
GetPayloadV3
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
return
api
.
getPayload
(
payloadID
)
return
api
.
getPayload
(
payloadID
,
false
)
}
}
func
(
api
*
ConsensusAPI
)
getPayload
(
payloadID
engine
.
PayloadID
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
func
(
api
*
ConsensusAPI
)
getPayload
(
payloadID
engine
.
PayloadID
,
full
bool
)
(
*
engine
.
ExecutionPayloadEnvelope
,
error
)
{
log
.
Trace
(
"Engine API request received"
,
"method"
,
"GetPayload"
,
"id"
,
payloadID
)
log
.
Trace
(
"Engine API request received"
,
"method"
,
"GetPayload"
,
"id"
,
payloadID
)
data
:=
api
.
localBlocks
.
get
(
payloadID
,
true
)
data
:=
api
.
localBlocks
.
get
(
payloadID
,
full
)
if
data
==
nil
{
if
data
==
nil
{
return
nil
,
engine
.
UnknownPayload
return
nil
,
engine
.
UnknownPayload
}
}
...
...
eth/catalyst/simulated_beacon.go
View file @
bce5c467
...
@@ -153,7 +153,7 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
...
@@ -153,7 +153,7 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error {
return
fmt
.
Errorf
(
"error calling forkchoice update: %v"
,
err
)
return
fmt
.
Errorf
(
"error calling forkchoice update: %v"
,
err
)
}
}
envelope
,
err
:=
c
.
engineAPI
.
getPayload
(
*
fcResponse
.
PayloadID
)
envelope
,
err
:=
c
.
engineAPI
.
getPayload
(
*
fcResponse
.
PayloadID
,
true
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"error retrieving payload: %v"
,
err
)
return
fmt
.
Errorf
(
"error retrieving payload: %v"
,
err
)
}
}
...
...
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