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
093b2ac3
Unverified
Commit
093b2ac3
authored
Nov 09, 2022
by
Martin Holst Swende
Committed by
GitHub
Nov 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/filters: fix failing benchmark-test (#26144)
parent
dffd93b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
filter_test.go
eth/filters/filter_test.go
+6
-1
No files found.
eth/filters/filter_test.go
View file @
093b2ac3
...
@@ -53,10 +53,10 @@ func BenchmarkFilters(b *testing.B) {
...
@@ -53,10 +53,10 @@ func BenchmarkFilters(b *testing.B) {
gspec
=
&
core
.
Genesis
{
gspec
=
&
core
.
Genesis
{
Alloc
:
core
.
GenesisAlloc
{
addr1
:
{
Balance
:
big
.
NewInt
(
1000000
)}},
Alloc
:
core
.
GenesisAlloc
{
addr1
:
{
Balance
:
big
.
NewInt
(
1000000
)}},
BaseFee
:
big
.
NewInt
(
params
.
InitialBaseFee
),
BaseFee
:
big
.
NewInt
(
params
.
InitialBaseFee
),
Config
:
params
.
TestChainConfig
,
}
}
)
)
defer
db
.
Close
()
defer
db
.
Close
()
_
,
chain
,
receipts
:=
core
.
GenerateChainWithGenesis
(
gspec
,
ethash
.
NewFaker
(),
100010
,
func
(
i
int
,
gen
*
core
.
BlockGen
)
{
_
,
chain
,
receipts
:=
core
.
GenerateChainWithGenesis
(
gspec
,
ethash
.
NewFaker
(),
100010
,
func
(
i
int
,
gen
*
core
.
BlockGen
)
{
switch
i
{
switch
i
{
case
2403
:
case
2403
:
...
@@ -77,6 +77,11 @@ func BenchmarkFilters(b *testing.B) {
...
@@ -77,6 +77,11 @@ func BenchmarkFilters(b *testing.B) {
gen
.
AddUncheckedTx
(
types
.
NewTransaction
(
999
,
common
.
HexToAddress
(
"0x999"
),
big
.
NewInt
(
999
),
999
,
gen
.
BaseFee
(),
nil
))
gen
.
AddUncheckedTx
(
types
.
NewTransaction
(
999
,
common
.
HexToAddress
(
"0x999"
),
big
.
NewInt
(
999
),
999
,
gen
.
BaseFee
(),
nil
))
}
}
})
})
// The test txs are not properly signed, can't simply create a chain
// and then import blocks. TODO(rjl493456442) try to get rid of the
// manual database writes.
gspec
.
MustCommit
(
db
)
for
i
,
block
:=
range
chain
{
for
i
,
block
:=
range
chain
{
rawdb
.
WriteBlock
(
db
,
block
)
rawdb
.
WriteBlock
(
db
,
block
)
rawdb
.
WriteCanonicalHash
(
db
,
block
.
Hash
(),
block
.
NumberU64
())
rawdb
.
WriteCanonicalHash
(
db
,
block
.
Hash
(),
block
.
NumberU64
())
...
...
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