good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
fb49e556
Commit
fb49e556
authored
Aug 20, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Fixed minor issues with filtering
parent
0eb1db0d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ethereal/assets/ext/filter.js
+5
-1
5 additions, 1 deletion
ethereal/assets/ext/filter.js
ethereal/gui.go
+1
-1
1 addition, 1 deletion
ethereal/gui.go
ethereal/ui_lib.go
+62
-0
62 additions, 0 deletions
ethereal/ui_lib.go
with
68 additions
and
2 deletions
ethereal/assets/ext/filter.js
+
5
−
1
View file @
fb49e556
...
@@ -3,7 +3,11 @@ var Filter = function(options) {
...
@@ -3,7 +3,11 @@ var Filter = function(options) {
this
.
seed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
seed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
options
=
options
;
this
.
options
=
options
;
if
(
options
==
"
chain
"
)
{
eth
.
registerFilterString
(
options
,
this
.
seed
);
}
else
if
(
typeof
options
===
"
object
"
)
{
eth
.
registerFilter
(
options
,
this
.
seed
);
eth
.
registerFilter
(
options
,
this
.
seed
);
}
};
};
Filter
.
prototype
.
changed
=
function
(
callback
)
{
Filter
.
prototype
.
changed
=
function
(
callback
)
{
...
...
This diff is collapsed.
Click to expand it.
ethereal/gui.go
+
1
−
1
View file @
fb49e556
...
@@ -72,7 +72,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden
...
@@ -72,7 +72,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
}
}
fmt
.
Println
(
string
(
data
))
fmt
.
Println
(
"plugins:"
,
string
(
data
))
json
.
Unmarshal
([]
byte
(
data
),
&
gui
.
plugins
)
json
.
Unmarshal
([]
byte
(
data
),
&
gui
.
plugins
)
...
...
This diff is collapsed.
Click to expand it.
ethereal/ui_lib.go
+
62
−
0
View file @
fb49e556
...
@@ -169,6 +169,20 @@ func (self *UiLib) RegisterFilter(object map[string]interface{}, seed int) {
...
@@ -169,6 +169,20 @@ func (self *UiLib) RegisterFilter(object map[string]interface{}, seed int) {
self
.
win
.
Root
()
.
Call
(
"invokeFilterCallback"
,
filter
.
MessagesToJson
(
messages
),
seed
,
callbackSeed
)
self
.
win
.
Root
()
.
Call
(
"invokeFilterCallback"
,
filter
.
MessagesToJson
(
messages
),
seed
,
callbackSeed
)
}
}
}
}
}
func
(
self
*
UiLib
)
RegisterFilterString
(
typ
string
,
seed
int
)
{
filter
:=
&
GuiFilter
{
ethpipe
.
NewJSFilterFromMap
(
nil
,
self
.
eth
),
seed
}
self
.
filters
[
seed
]
=
filter
if
typ
==
"chain"
{
filter
.
BlockCallback
=
func
(
block
*
ethchain
.
Block
)
{
for
_
,
callbackSeed
:=
range
self
.
filterCallbacks
[
seed
]
{
self
.
win
.
Root
()
.
Call
(
"invokeFilterCallback"
,
"{}"
,
seed
,
callbackSeed
)
}
}
}
}
}
func
(
self
*
UiLib
)
RegisterFilterCallback
(
seed
,
cbSeed
int
)
{
func
(
self
*
UiLib
)
RegisterFilterCallback
(
seed
,
cbSeed
int
)
{
...
@@ -187,3 +201,51 @@ type GuiFilter struct {
...
@@ -187,3 +201,51 @@ type GuiFilter struct {
*
ethpipe
.
JSFilter
*
ethpipe
.
JSFilter
seed
int
seed
int
}
}
func
(
self
*
UiLib
)
Transact
(
object
map
[
string
]
interface
{})
(
*
ethpipe
.
JSReceipt
,
error
)
{
// Default values
if
object
[
"from"
]
==
nil
{
object
[
"from"
]
=
""
}
if
object
[
"to"
]
==
nil
{
object
[
"to"
]
=
""
}
if
object
[
"value"
]
==
nil
{
object
[
"value"
]
=
""
}
if
object
[
"gas"
]
==
nil
{
object
[
"gas"
]
=
""
}
if
object
[
"gasPrice"
]
==
nil
{
object
[
"gasPrice"
]
=
""
}
var
dataStr
string
var
data
[]
string
if
list
,
ok
:=
object
[
"data"
]
.
(
*
qml
.
List
);
ok
{
list
.
Convert
(
&
data
)
}
for
_
,
str
:=
range
data
{
if
ethutil
.
IsHex
(
str
)
{
str
=
str
[
2
:
]
if
len
(
str
)
!=
64
{
str
=
ethutil
.
LeftPadString
(
str
,
64
)
}
}
else
{
str
=
ethutil
.
Bytes2Hex
(
ethutil
.
LeftPadBytes
(
ethutil
.
Big
(
str
)
.
Bytes
(),
32
))
}
dataStr
+=
str
}
return
self
.
JSPipe
.
Transact
(
object
[
"from"
]
.
(
string
),
object
[
"to"
]
.
(
string
),
object
[
"value"
]
.
(
string
),
object
[
"gas"
]
.
(
string
),
object
[
"gasPrice"
]
.
(
string
),
dataStr
,
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment