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
9e24491c
Commit
9e24491c
authored
Jul 24, 2018
by
Sheldon
Committed by
Péter Szilágyi
Jul 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/bloombits, light: fix typos (#17235)
parent
b536460f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
matcher.go
core/bloombits/matcher.go
+5
-5
matcher_test.go
core/bloombits/matcher_test.go
+1
-1
lightchain_test.go
light/lightchain_test.go
+1
-1
No files found.
core/bloombits/matcher.go
View file @
9e24491c
...
@@ -59,7 +59,7 @@ type partialMatches struct {
...
@@ -59,7 +59,7 @@ type partialMatches struct {
// It can also have the actual results set to be used as a delivery data struct.
// It can also have the actual results set to be used as a delivery data struct.
//
//
// The contest and error fields are used by the light client to terminate matching
// The contest and error fields are used by the light client to terminate matching
// early if an error is enountered on some path of the pipeline.
// early if an error is en
c
ountered on some path of the pipeline.
type
Retrieval
struct
{
type
Retrieval
struct
{
Bit
uint
Bit
uint
Sections
[]
uint64
Sections
[]
uint64
...
@@ -218,7 +218,7 @@ func (m *Matcher) Start(ctx context.Context, begin, end uint64, results chan uin
...
@@ -218,7 +218,7 @@ func (m *Matcher) Start(ctx context.Context, begin, end uint64, results chan uin
// run creates a daisy-chain of sub-matchers, one for the address set and one
// run creates a daisy-chain of sub-matchers, one for the address set and one
// for each topic set, each sub-matcher receiving a section only if the previous
// for each topic set, each sub-matcher receiving a section only if the previous
// ones have all found a potential match in one of the blocks of the section,
// ones have all found a potential match in one of the blocks of the section,
// then binary AND-ing its own matches and forwaring the result to the next one.
// then binary AND-ing its own matches and forwar
d
ing the result to the next one.
//
//
// The method starts feeding the section indexes into the first sub-matcher on a
// The method starts feeding the section indexes into the first sub-matcher on a
// new goroutine and returns a sink channel receiving the results.
// new goroutine and returns a sink channel receiving the results.
...
@@ -543,7 +543,7 @@ func (s *MatcherSession) Error() error {
...
@@ -543,7 +543,7 @@ func (s *MatcherSession) Error() error {
}
}
// AllocateRetrieval assigns a bloom bit index to a client process that can either
// AllocateRetrieval assigns a bloom bit index to a client process that can either
// immediately reuest and fetch the section contents assigned to this bit or wait
// immediately re
q
uest and fetch the section contents assigned to this bit or wait
// a little while for more sections to be requested.
// a little while for more sections to be requested.
func
(
s
*
MatcherSession
)
AllocateRetrieval
()
(
uint
,
bool
)
{
func
(
s
*
MatcherSession
)
AllocateRetrieval
()
(
uint
,
bool
)
{
fetcher
:=
make
(
chan
uint
)
fetcher
:=
make
(
chan
uint
)
...
@@ -599,8 +599,8 @@ func (s *MatcherSession) DeliverSections(bit uint, sections []uint64, bitsets []
...
@@ -599,8 +599,8 @@ func (s *MatcherSession) DeliverSections(bit uint, sections []uint64, bitsets []
}
}
}
}
// Multiplex polls the matcher session for rerieval tasks and multiplexes it into
// Multiplex polls the matcher session for re
t
rieval tasks and multiplexes it into
// the reuested retrieval queue to be serviced together with other sessions.
// the re
q
uested retrieval queue to be serviced together with other sessions.
//
//
// This method will block for the lifetime of the session. Even after termination
// This method will block for the lifetime of the session. Even after termination
// of the session, any request in-flight need to be responded to! Empty responses
// of the session, any request in-flight need to be responded to! Empty responses
...
...
core/bloombits/matcher_test.go
View file @
9e24491c
...
@@ -156,7 +156,7 @@ func testMatcher(t *testing.T, filter [][]bloomIndexes, start, blocks uint64, in
...
@@ -156,7 +156,7 @@ func testMatcher(t *testing.T, filter [][]bloomIndexes, start, blocks uint64, in
// Track the number of retrieval requests made
// Track the number of retrieval requests made
var
requested
uint32
var
requested
uint32
// Start the matching session for the filter and the retriver goroutines
// Start the matching session for the filter and the retri
e
ver goroutines
quit
:=
make
(
chan
struct
{})
quit
:=
make
(
chan
struct
{})
matches
:=
make
(
chan
uint64
,
16
)
matches
:=
make
(
chan
uint64
,
16
)
...
...
light/lightchain_test.go
View file @
9e24491c
...
@@ -326,7 +326,7 @@ func TestBadHeaderHashes(t *testing.T) {
...
@@ -326,7 +326,7 @@ func TestBadHeaderHashes(t *testing.T) {
func
TestReorgBadHeaderHashes
(
t
*
testing
.
T
)
{
func
TestReorgBadHeaderHashes
(
t
*
testing
.
T
)
{
bc
:=
newTestLightChain
()
bc
:=
newTestLightChain
()
// Create a chain, import and ban aferwards
// Create a chain, import and ban af
t
erwards
headers
:=
makeHeaderChainWithDiff
(
bc
.
genesisBlock
,
[]
int
{
1
,
2
,
3
,
4
},
10
)
headers
:=
makeHeaderChainWithDiff
(
bc
.
genesisBlock
,
[]
int
{
1
,
2
,
3
,
4
},
10
)
if
_
,
err
:=
bc
.
InsertHeaderChain
(
headers
,
1
);
err
!=
nil
{
if
_
,
err
:=
bc
.
InsertHeaderChain
(
headers
,
1
);
err
!=
nil
{
...
...
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