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
02c50227
Commit
02c50227
authored
Jul 20, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1496 from karalabe/fix-xeth-races
xeth: fix #1485, data race in fiilter creation and event firing
parents
12bb743b
3642441c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
xeth.go
xeth/xeth.go
+9
-0
No files found.
xeth/xeth.go
View file @
02c50227
...
...
@@ -518,6 +518,9 @@ func (self *XEth) UninstallFilter(id int) bool {
}
func
(
self
*
XEth
)
NewLogFilter
(
earliest
,
latest
int64
,
skip
,
max
int
,
address
[]
string
,
topics
[][]
string
)
int
{
self
.
logMu
.
Lock
()
defer
self
.
logMu
.
Unlock
()
var
id
int
filter
:=
core
.
NewFilter
(
self
.
backend
)
filter
.
SetEarliestBlock
(
earliest
)
...
...
@@ -539,6 +542,9 @@ func (self *XEth) NewLogFilter(earliest, latest int64, skip, max int, address []
}
func
(
self
*
XEth
)
NewTransactionFilter
()
int
{
self
.
transactionMu
.
Lock
()
defer
self
.
transactionMu
.
Unlock
()
var
id
int
filter
:=
core
.
NewFilter
(
self
.
backend
)
filter
.
TransactionCallback
=
func
(
tx
*
types
.
Transaction
)
{
...
...
@@ -553,6 +559,9 @@ func (self *XEth) NewTransactionFilter() int {
}
func
(
self
*
XEth
)
NewBlockFilter
()
int
{
self
.
blockMu
.
Lock
()
defer
self
.
blockMu
.
Unlock
()
var
id
int
filter
:=
core
.
NewFilter
(
self
.
backend
)
filter
.
BlockCallback
=
func
(
block
*
types
.
Block
,
logs
state
.
Logs
)
{
...
...
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