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
57c252ef
Unverified
Commit
57c252ef
authored
Nov 01, 2021
by
Sparty
Committed by
GitHub
Nov 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounts/abi/bin/backends: return basefee in suggestGasPrice (#23838)
Co-authored-by:
mrx
<
mrx@mrx.com
>
parent
410e731b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
simulated.go
accounts/abi/bind/backends/simulated.go
+1
-1
simulated_test.go
accounts/abi/bind/backends/simulated_test.go
+2
-2
No files found.
accounts/abi/bind/backends/simulated.go
View file @
57c252ef
...
...
@@ -462,7 +462,7 @@ func (b *SimulatedBackend) PendingNonceAt(ctx context.Context, account common.Ad
// SuggestGasPrice implements ContractTransactor.SuggestGasPrice. Since the simulated
// chain doesn't have miners, we just return a gas price of 1 for any call.
func
(
b
*
SimulatedBackend
)
SuggestGasPrice
(
ctx
context
.
Context
)
(
*
big
.
Int
,
error
)
{
return
b
ig
.
NewInt
(
1
)
,
nil
return
b
.
pendingBlock
.
Header
()
.
BaseFee
,
nil
}
// SuggestGasTipCap implements ContractTransactor.SuggestGasTipCap. Since the simulated
...
...
accounts/abi/bind/backends/simulated_test.go
View file @
57c252ef
...
...
@@ -916,8 +916,8 @@ func TestSuggestGasPrice(t *testing.T) {
if
err
!=
nil
{
t
.
Errorf
(
"could not get gas price: %v"
,
err
)
}
if
gasPrice
.
Uint64
()
!=
uint64
(
1
)
{
t
.
Errorf
(
"gas price was not expected value of
1. actual: %v"
,
gasPrice
.
Uint64
())
if
gasPrice
.
Uint64
()
!=
sim
.
pendingBlock
.
Header
()
.
BaseFee
.
Uint64
(
)
{
t
.
Errorf
(
"gas price was not expected value of
%v. actual: %v"
,
sim
.
pendingBlock
.
Header
()
.
BaseFee
.
Uint64
()
,
gasPrice
.
Uint64
())
}
}
...
...
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