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
05dab7f6
Unverified
Commit
05dab7f6
authored
May 26, 2021
by
aaronbuchwald
Committed by
GitHub
May 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal/ethapi: remove unused vm.Config parameter of DoCall (#22942)
parent
10962b68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
graphql.go
graphql/graphql.go
+2
-3
api.go
internal/ethapi/api.go
+3
-3
No files found.
graphql/graphql.go
View file @
05dab7f6
...
...
@@ -30,7 +30,6 @@ import (
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/eth/filters"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/rpc"
...
...
@@ -870,7 +869,7 @@ func (b *Block) Call(ctx context.Context, args struct {
return
nil
,
err
}
}
result
,
err
:=
ethapi
.
DoCall
(
ctx
,
b
.
backend
,
args
.
Data
,
*
b
.
numberOrHash
,
nil
,
vm
.
Config
{},
5
*
time
.
Second
,
b
.
backend
.
RPCGasCap
())
result
,
err
:=
ethapi
.
DoCall
(
ctx
,
b
.
backend
,
args
.
Data
,
*
b
.
numberOrHash
,
nil
,
5
*
time
.
Second
,
b
.
backend
.
RPCGasCap
())
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -940,7 +939,7 @@ func (p *Pending) Call(ctx context.Context, args struct {
Data
ethapi
.
TransactionArgs
})
(
*
CallResult
,
error
)
{
pendingBlockNr
:=
rpc
.
BlockNumberOrHashWithNumber
(
rpc
.
PendingBlockNumber
)
result
,
err
:=
ethapi
.
DoCall
(
ctx
,
p
.
backend
,
args
.
Data
,
pendingBlockNr
,
nil
,
vm
.
Config
{},
5
*
time
.
Second
,
p
.
backend
.
RPCGasCap
())
result
,
err
:=
ethapi
.
DoCall
(
ctx
,
p
.
backend
,
args
.
Data
,
pendingBlockNr
,
nil
,
5
*
time
.
Second
,
p
.
backend
.
RPCGasCap
())
if
err
!=
nil
{
return
nil
,
err
}
...
...
internal/ethapi/api.go
View file @
05dab7f6
...
...
@@ -806,7 +806,7 @@ func (diff *StateOverride) Apply(state *state.StateDB) error {
return
nil
}
func
DoCall
(
ctx
context
.
Context
,
b
Backend
,
args
TransactionArgs
,
blockNrOrHash
rpc
.
BlockNumberOrHash
,
overrides
*
StateOverride
,
vmCfg
vm
.
Config
,
timeout
time
.
Duration
,
globalGasCap
uint64
)
(
*
core
.
ExecutionResult
,
error
)
{
func
DoCall
(
ctx
context
.
Context
,
b
Backend
,
args
TransactionArgs
,
blockNrOrHash
rpc
.
BlockNumberOrHash
,
overrides
*
StateOverride
,
timeout
time
.
Duration
,
globalGasCap
uint64
)
(
*
core
.
ExecutionResult
,
error
)
{
defer
func
(
start
time
.
Time
)
{
log
.
Debug
(
"Executing EVM call finished"
,
"runtime"
,
time
.
Since
(
start
))
}(
time
.
Now
())
state
,
header
,
err
:=
b
.
StateAndHeaderByNumberOrHash
(
ctx
,
blockNrOrHash
)
...
...
@@ -895,7 +895,7 @@ func (e *revertError) ErrorData() interface{} {
// Note, this function doesn't make and changes in the state/blockchain and is
// useful to execute and retrieve values.
func
(
s
*
PublicBlockChainAPI
)
Call
(
ctx
context
.
Context
,
args
TransactionArgs
,
blockNrOrHash
rpc
.
BlockNumberOrHash
,
overrides
*
StateOverride
)
(
hexutil
.
Bytes
,
error
)
{
result
,
err
:=
DoCall
(
ctx
,
s
.
b
,
args
,
blockNrOrHash
,
overrides
,
vm
.
Config
{},
5
*
time
.
Second
,
s
.
b
.
RPCGasCap
())
result
,
err
:=
DoCall
(
ctx
,
s
.
b
,
args
,
blockNrOrHash
,
overrides
,
5
*
time
.
Second
,
s
.
b
.
RPCGasCap
())
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -969,7 +969,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr
executable
:=
func
(
gas
uint64
)
(
bool
,
*
core
.
ExecutionResult
,
error
)
{
args
.
Gas
=
(
*
hexutil
.
Uint64
)(
&
gas
)
result
,
err
:=
DoCall
(
ctx
,
b
,
args
,
blockNrOrHash
,
nil
,
vm
.
Config
{},
0
,
gasCap
)
result
,
err
:=
DoCall
(
ctx
,
b
,
args
,
blockNrOrHash
,
nil
,
0
,
gasCap
)
if
err
!=
nil
{
if
errors
.
Is
(
err
,
core
.
ErrIntrinsicGas
)
{
return
true
,
nil
,
nil
// Special case, raise gas limit
...
...
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