|
|
@ -30,9 +30,11 @@ import ( |
|
|
|
"github.com/ethereum/go-ethereum/core/types" |
|
|
|
"github.com/ethereum/go-ethereum/core/types" |
|
|
|
"github.com/ethereum/go-ethereum/eth" |
|
|
|
"github.com/ethereum/go-ethereum/eth" |
|
|
|
"github.com/ethereum/go-ethereum/eth/downloader" |
|
|
|
"github.com/ethereum/go-ethereum/eth/downloader" |
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/internal/version" |
|
|
|
"github.com/ethereum/go-ethereum/log" |
|
|
|
"github.com/ethereum/go-ethereum/log" |
|
|
|
"github.com/ethereum/go-ethereum/miner" |
|
|
|
"github.com/ethereum/go-ethereum/miner" |
|
|
|
"github.com/ethereum/go-ethereum/node" |
|
|
|
"github.com/ethereum/go-ethereum/node" |
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/params" |
|
|
|
"github.com/ethereum/go-ethereum/params/forks" |
|
|
|
"github.com/ethereum/go-ethereum/params/forks" |
|
|
|
"github.com/ethereum/go-ethereum/rpc" |
|
|
|
"github.com/ethereum/go-ethereum/rpc" |
|
|
|
) |
|
|
|
) |
|
|
@ -813,6 +815,23 @@ func (api *ConsensusAPI) ExchangeCapabilities([]string) []string { |
|
|
|
return caps |
|
|
|
return caps |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GetClientVersionV1 exchanges client version data of this node.
|
|
|
|
|
|
|
|
func (api *ConsensusAPI) GetClientVersionV1(info engine.ClientVersionV1) []engine.ClientVersionV1 { |
|
|
|
|
|
|
|
log.Trace("Engine API request received", "method", "GetClientVersionV1", "info", info.String()) |
|
|
|
|
|
|
|
commit := make([]byte, 4) |
|
|
|
|
|
|
|
if vcs, ok := version.VCS(); ok { |
|
|
|
|
|
|
|
commit = common.FromHex(vcs.Commit)[0:4] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return []engine.ClientVersionV1{ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Code: engine.ClientCode, |
|
|
|
|
|
|
|
Name: engine.ClientName, |
|
|
|
|
|
|
|
Version: params.VersionWithMeta, |
|
|
|
|
|
|
|
Commit: hexutil.Encode(commit), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetPayloadBodiesByHashV1 implements engine_getPayloadBodiesByHashV1 which allows for retrieval of a list
|
|
|
|
// GetPayloadBodiesByHashV1 implements engine_getPayloadBodiesByHashV1 which allows for retrieval of a list
|
|
|
|
// of block bodies by the engine api.
|
|
|
|
// of block bodies by the engine api.
|
|
|
|
func (api *ConsensusAPI) GetPayloadBodiesByHashV1(hashes []common.Hash) []*engine.ExecutionPayloadBodyV1 { |
|
|
|
func (api *ConsensusAPI) GetPayloadBodiesByHashV1(hashes []common.Hash) []*engine.ExecutionPayloadBodyV1 { |
|
|
|