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
baf20010
Commit
baf20010
authored
Mar 29, 2017
by
bas-vk
Committed by
Felix Lange
Mar 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/types: rename txdata.gasLimit -> txdata.gas in JSON (#13848)
parent
16afb5c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
gen_tx_json.go
core/types/gen_tx_json.go
+3
-3
transaction.go
core/types/transaction.go
+1
-1
No files found.
core/types/gen_tx_json.go
View file @
baf20010
...
@@ -15,7 +15,7 @@ func (t txdata) MarshalJSON() ([]byte, error) {
...
@@ -15,7 +15,7 @@ func (t txdata) MarshalJSON() ([]byte, error) {
type
txdataJSON
struct
{
type
txdataJSON
struct
{
AccountNonce
hexutil
.
Uint64
`json:"nonce"`
AccountNonce
hexutil
.
Uint64
`json:"nonce"`
Price
*
hexutil
.
Big
`json:"gasPrice"`
Price
*
hexutil
.
Big
`json:"gasPrice"`
GasLimit
*
hexutil
.
Big
`json:"gas
Limit
"`
GasLimit
*
hexutil
.
Big
`json:"gas"`
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
Amount
*
hexutil
.
Big
`json:"value"`
Amount
*
hexutil
.
Big
`json:"value"`
Payload
hexutil
.
Bytes
`json:"input"`
Payload
hexutil
.
Bytes
`json:"input"`
...
@@ -42,7 +42,7 @@ func (t *txdata) UnmarshalJSON(input []byte) error {
...
@@ -42,7 +42,7 @@ func (t *txdata) UnmarshalJSON(input []byte) error {
type
txdataJSON
struct
{
type
txdataJSON
struct
{
AccountNonce
*
hexutil
.
Uint64
`json:"nonce"`
AccountNonce
*
hexutil
.
Uint64
`json:"nonce"`
Price
*
hexutil
.
Big
`json:"gasPrice"`
Price
*
hexutil
.
Big
`json:"gasPrice"`
GasLimit
*
hexutil
.
Big
`json:"gas
Limit
"`
GasLimit
*
hexutil
.
Big
`json:"gas"`
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
Amount
*
hexutil
.
Big
`json:"value"`
Amount
*
hexutil
.
Big
`json:"value"`
Payload
hexutil
.
Bytes
`json:"input"`
Payload
hexutil
.
Bytes
`json:"input"`
...
@@ -65,7 +65,7 @@ func (t *txdata) UnmarshalJSON(input []byte) error {
...
@@ -65,7 +65,7 @@ func (t *txdata) UnmarshalJSON(input []byte) error {
}
}
x
.
Price
=
(
*
big
.
Int
)(
dec
.
Price
)
x
.
Price
=
(
*
big
.
Int
)(
dec
.
Price
)
if
dec
.
GasLimit
==
nil
{
if
dec
.
GasLimit
==
nil
{
return
errors
.
New
(
"missing required field 'gas
Limit
' for txdata"
)
return
errors
.
New
(
"missing required field 'gas' for txdata"
)
}
}
x
.
GasLimit
=
(
*
big
.
Int
)(
dec
.
GasLimit
)
x
.
GasLimit
=
(
*
big
.
Int
)(
dec
.
GasLimit
)
if
dec
.
Recipient
!=
nil
{
if
dec
.
Recipient
!=
nil
{
...
...
core/types/transaction.go
View file @
baf20010
...
@@ -57,7 +57,7 @@ type Transaction struct {
...
@@ -57,7 +57,7 @@ type Transaction struct {
type
txdata
struct
{
type
txdata
struct
{
AccountNonce
uint64
`json:"nonce"`
AccountNonce
uint64
`json:"nonce"`
Price
*
big
.
Int
`json:"gasPrice"`
Price
*
big
.
Int
`json:"gasPrice"`
GasLimit
*
big
.
Int
`json:"gas
Limit
"`
GasLimit
*
big
.
Int
`json:"gas"`
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
// nil means contract creation
Recipient
*
common
.
Address
`json:"to" optional:"yes" rlp:"nil"`
// nil means contract creation
Amount
*
big
.
Int
`json:"value"`
Amount
*
big
.
Int
`json:"value"`
Payload
[]
byte
`json:"input"`
Payload
[]
byte
`json:"input"`
...
...
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