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
3b053185
Unverified
Commit
3b053185
authored
3 years ago
by
ucwong
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/evm, eth/ethconfig: regenerate struct codecs (#23140)
parent
a182c768
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
gen_stenv.go
cmd/evm/internal/t8ntool/gen_stenv.go
+8
-8
gen_config.go
eth/ethconfig/gen_config.go
+11
-4
No files found.
cmd/evm/internal/t8ntool/gen_stenv.go
View file @
3b053185
...
...
@@ -16,11 +16,11 @@ var _ = (*stEnvMarshaling)(nil)
// MarshalJSON marshals as JSON.
func
(
s
stEnv
)
MarshalJSON
()
([]
byte
,
error
)
{
type
stEnv
struct
{
Coinbase
common
.
UnprefixedAddress
`json:"currentCoinbase" gencodec:"required"`
Coinbase
common
.
UnprefixedAddress
`json:"currentCoinbase"
gencodec:"required"`
Difficulty
*
math
.
HexOrDecimal256
`json:"currentDifficulty" gencodec:"required"`
GasLimit
math
.
HexOrDecimal64
`json:"currentGasLimit" gencodec:"required"`
Number
math
.
HexOrDecimal64
`json:"currentNumber" gencodec:"required"`
Timestamp
math
.
HexOrDecimal64
`json:"currentTimestamp" gencodec:"required"`
GasLimit
math
.
HexOrDecimal64
`json:"currentGasLimit"
gencodec:"required"`
Number
math
.
HexOrDecimal64
`json:"currentNumber"
gencodec:"required"`
Timestamp
math
.
HexOrDecimal64
`json:"currentTimestamp"
gencodec:"required"`
BlockHashes
map
[
math
.
HexOrDecimal64
]
common
.
Hash
`json:"blockHashes,omitempty"`
Ommers
[]
ommer
`json:"ommers,omitempty"`
BaseFee
*
math
.
HexOrDecimal256
`json:"currentBaseFee,omitempty"`
...
...
@@ -40,11 +40,11 @@ func (s stEnv) MarshalJSON() ([]byte, error) {
// UnmarshalJSON unmarshals from JSON.
func
(
s
*
stEnv
)
UnmarshalJSON
(
input
[]
byte
)
error
{
type
stEnv
struct
{
Coinbase
*
common
.
UnprefixedAddress
`json:"currentCoinbase" gencodec:"required"`
Coinbase
*
common
.
UnprefixedAddress
`json:"currentCoinbase"
gencodec:"required"`
Difficulty
*
math
.
HexOrDecimal256
`json:"currentDifficulty" gencodec:"required"`
GasLimit
*
math
.
HexOrDecimal64
`json:"currentGasLimit" gencodec:"required"`
Number
*
math
.
HexOrDecimal64
`json:"currentNumber" gencodec:"required"`
Timestamp
*
math
.
HexOrDecimal64
`json:"currentTimestamp" gencodec:"required"`
GasLimit
*
math
.
HexOrDecimal64
`json:"currentGasLimit"
gencodec:"required"`
Number
*
math
.
HexOrDecimal64
`json:"currentNumber"
gencodec:"required"`
Timestamp
*
math
.
HexOrDecimal64
`json:"currentTimestamp"
gencodec:"required"`
BlockHashes
map
[
math
.
HexOrDecimal64
]
common
.
Hash
`json:"blockHashes,omitempty"`
Ommers
[]
ommer
`json:"ommers,omitempty"`
BaseFee
*
math
.
HexOrDecimal256
`json:"currentBaseFee,omitempty"`
...
...
This diff is collapsed.
Click to expand it.
eth/ethconfig/gen_config.go
View file @
3b053185
...
...
@@ -3,6 +3,7 @@
package
ethconfig
import
(
"math/big"
"time"
"github.com/ethereum/go-ethereum/common"
...
...
@@ -55,10 +56,11 @@ func (c Config) MarshalTOML() (interface{}, error) {
DocRoot
string
`toml:"-"`
EWASMInterpreter
string
EVMInterpreter
string
RPCGasCap
uint64
`toml:",omitempty"`
RPCTxFeeCap
float64
`toml:",omitempty"`
RPCGasCap
uint64
RPCTxFeeCap
float64
Checkpoint
*
params
.
TrustedCheckpoint
`toml:",omitempty"`
CheckpointOracle
*
params
.
CheckpointOracleConfig
`toml:",omitempty"`
OverrideLondon
*
big
.
Int
`toml:",omitempty"`
}
var
enc
Config
enc
.
Genesis
=
c
.
Genesis
...
...
@@ -103,6 +105,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc
.
RPCTxFeeCap
=
c
.
RPCTxFeeCap
enc
.
Checkpoint
=
c
.
Checkpoint
enc
.
CheckpointOracle
=
c
.
CheckpointOracle
enc
.
OverrideLondon
=
c
.
OverrideLondon
return
&
enc
,
nil
}
...
...
@@ -147,10 +150,11 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
DocRoot
*
string
`toml:"-"`
EWASMInterpreter
*
string
EVMInterpreter
*
string
RPCGasCap
*
uint64
`toml:",omitempty"`
RPCTxFeeCap
*
float64
`toml:",omitempty"`
RPCGasCap
*
uint64
RPCTxFeeCap
*
float64
Checkpoint
*
params
.
TrustedCheckpoint
`toml:",omitempty"`
CheckpointOracle
*
params
.
CheckpointOracleConfig
`toml:",omitempty"`
OverrideLondon
*
big
.
Int
`toml:",omitempty"`
}
var
dec
Config
if
err
:=
unmarshal
(
&
dec
);
err
!=
nil
{
...
...
@@ -282,5 +286,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if
dec
.
CheckpointOracle
!=
nil
{
c
.
CheckpointOracle
=
dec
.
CheckpointOracle
}
if
dec
.
OverrideLondon
!=
nil
{
c
.
OverrideLondon
=
dec
.
OverrideLondon
}
return
nil
}
This diff is collapsed.
Click to expand it.
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