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
0eb1db0d
Commit
0eb1db0d
authored
Aug 20, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added messages method
parent
ecc2c609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
filter.js
ethereal/assets/ext/filter.js
+7
-3
No files found.
ethereal/assets/ext/filter.js
View file @
0eb1db0d
var
Filter
=
function
(
eth
,
options
)
{
var
Filter
=
function
(
options
)
{
this
.
callbacks
=
{};
this
.
callbacks
=
{};
this
.
seed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
seed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
eth
=
eth
;
this
.
options
=
options
;
eth
.
registerFilter
(
options
,
this
.
seed
);
eth
.
registerFilter
(
options
,
this
.
seed
);
};
};
Filter
.
prototype
.
changed
=
function
(
callback
)
{
Filter
.
prototype
.
changed
=
function
(
callback
)
{
var
cbseed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
var
cbseed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
eth
.
registerFilterCallback
(
this
.
seed
,
cbseed
);
eth
.
registerFilterCallback
(
this
.
seed
,
cbseed
);
var
self
=
this
;
var
self
=
this
;
message
.
connect
(
function
(
messages
,
seed
,
callbackSeed
)
{
message
.
connect
(
function
(
messages
,
seed
,
callbackSeed
)
{
...
@@ -21,3 +21,7 @@ Filter.prototype.changed = function(callback) {
...
@@ -21,3 +21,7 @@ Filter.prototype.changed = function(callback) {
Filter
.
prototype
.
uninstall
=
function
()
{
Filter
.
prototype
.
uninstall
=
function
()
{
eth
.
uninstallFilter
(
this
.
seed
)
eth
.
uninstallFilter
(
this
.
seed
)
}
}
Filter
.
prototype
.
messages
=
function
()
{
return
JSON
.
parse
(
eth
.
messages
(
this
.
options
))
}
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