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
685eec31
Unverified
Commit
685eec31
authored
Feb 07, 2019
by
Péter Szilágyi
Committed by
GitHub
Feb 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19012 from holiman/default155
ethapi: default to use eip-155 protected transactions
parents
9fa4c3ce
2ac61a99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
api.go
internal/ethapi/api.go
+3
-15
No files found.
internal/ethapi/api.go
View file @
685eec31
...
...
@@ -356,11 +356,7 @@ func (s *PrivateAccountAPI) signTransaction(ctx context.Context, args *SendTxArg
// Assemble the transaction and sign with the wallet
tx
:=
args
.
toTransaction
()
var
chainID
*
big
.
Int
if
config
:=
s
.
b
.
ChainConfig
();
config
.
IsEIP155
(
s
.
b
.
CurrentBlock
()
.
Number
())
{
chainID
=
config
.
ChainID
}
return
wallet
.
SignTxWithPassphrase
(
account
,
passwd
,
tx
,
chainID
)
return
wallet
.
SignTxWithPassphrase
(
account
,
passwd
,
tx
,
s
.
b
.
ChainConfig
()
.
ChainID
)
}
// SendTransaction will create a transaction from the given arguments and
...
...
@@ -1186,11 +1182,7 @@ func (s *PublicTransactionPoolAPI) sign(addr common.Address, tx *types.Transacti
return
nil
,
err
}
// Request the wallet to sign the transaction
var
chainID
*
big
.
Int
if
config
:=
s
.
b
.
ChainConfig
();
config
.
IsEIP155
(
s
.
b
.
CurrentBlock
()
.
Number
())
{
chainID
=
config
.
ChainID
}
return
wallet
.
SignTx
(
account
,
tx
,
chainID
)
return
wallet
.
SignTx
(
account
,
tx
,
s
.
b
.
ChainConfig
()
.
ChainID
)
}
// SendTxArgs represents the arguments to sumbit a new transaction into the transaction pool.
...
...
@@ -1306,11 +1298,7 @@ func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args Sen
// Assemble the transaction and sign with the wallet
tx
:=
args
.
toTransaction
()
var
chainID
*
big
.
Int
if
config
:=
s
.
b
.
ChainConfig
();
config
.
IsEIP155
(
s
.
b
.
CurrentBlock
()
.
Number
())
{
chainID
=
config
.
ChainID
}
signed
,
err
:=
wallet
.
SignTx
(
account
,
tx
,
chainID
)
signed
,
err
:=
wallet
.
SignTx
(
account
,
tx
,
s
.
b
.
ChainConfig
()
.
ChainID
)
if
err
!=
nil
{
return
common
.
Hash
{},
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