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
ee35ddc8
Unverified
Commit
ee35ddc8
authored
May 27, 2021
by
Felix Lange
Committed by
GitHub
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/devp2p/internal/ethtest: ignore block announcement in tx test (#22957)
parent
04cb5e2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
suite.go
cmd/devp2p/internal/ethtest/suite.go
+10
-1
No files found.
cmd/devp2p/internal/ethtest/suite.go
View file @
ee35ddc8
...
...
@@ -732,17 +732,20 @@ func (s *Suite) TestNewPooledTxs66(t *utesting.T) {
if
err
:=
s
.
sendNextBlock
(
eth66
);
err
!=
nil
{
t
.
Fatalf
(
"failed to send next block: %v"
,
err
)
}
// generate 50 txs
hashMap
,
_
,
err
:=
generateTxs
(
s
,
50
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed to generate transactions: %v"
,
err
)
}
// create new pooled tx hashes announcement
hashes
:=
make
([]
common
.
Hash
,
0
)
for
_
,
hash
:=
range
hashMap
{
hashes
=
append
(
hashes
,
hash
)
}
announce
:=
NewPooledTransactionHashes
(
hashes
)
// send announcement
conn
,
err
:=
s
.
dial66
()
if
err
!=
nil
{
...
...
@@ -755,6 +758,7 @@ func (s *Suite) TestNewPooledTxs66(t *utesting.T) {
if
err
=
conn
.
Write
(
announce
);
err
!=
nil
{
t
.
Fatalf
(
"failed to write to connection: %v"
,
err
)
}
// wait for GetPooledTxs request
for
{
_
,
msg
:=
conn
.
readAndServe66
(
s
.
chain
,
timeout
)
...
...
@@ -764,8 +768,13 @@ func (s *Suite) TestNewPooledTxs66(t *utesting.T) {
t
.
Fatalf
(
"unexpected number of txs requested: wanted %d, got %d"
,
len
(
hashes
),
len
(
msg
))
}
return
// ignore propagated txs from previous tests
case
*
NewPooledTransactionHashes
:
// ignore propagated txs from old tests
continue
// ignore block announcements from previous tests
case
*
NewBlockHashes
:
continue
case
*
NewBlock
:
continue
default
:
t
.
Fatalf
(
"unexpected %s"
,
pretty
.
Sdump
(
msg
))
...
...
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