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
e32f7baa
Commit
e32f7baa
authored
Dec 22, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Concat and pad data
parent
60b1f962
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
browser.qml
cmd/mist/assets/qml/browser.qml
+3
-2
whisper.qml
cmd/mist/assets/qml/views/whisper.qml
+1
-1
whisper.go
ui/qt/qwhisper/whisper.go
+7
-2
No files found.
cmd/mist/assets/qml/browser.qml
View file @
e32f7baa
...
@@ -59,7 +59,8 @@ Rectangle {
...
@@ -59,7 +59,8 @@ Rectangle {
}
}
Component.onCompleted
:
{
Component.onCompleted
:
{
webview
.
url
=
"http://etherian.io"
//webview.url = "http://etherian.io"
webview
.
url
=
"file:///Users/jeffrey/test.html"
}
}
signal
messages
(
var
messages
,
int
id
);
signal
messages
(
var
messages
,
int
id
);
...
@@ -350,7 +351,7 @@ Rectangle {
...
@@ -350,7 +351,7 @@ Rectangle {
for
(
var
i
=
0
;
i
<
fields
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
fields
.
length
;
i
++
)
{
params
[
fields
[
i
]]
=
params
[
fields
[
i
]]
||
""
;
params
[
fields
[
i
]]
=
params
[
fields
[
i
]]
||
""
;
}
}
if
(
typeof
params
.
payload
===
"object"
)
{
params
.
payload
=
params
.
payload
.
join
(
""
);
}
if
(
typeof
params
.
payload
!==
"object"
)
{
params
.
payload
=
[
params
.
payload
];
}
//
params.payload = params.payload.join(""); }
params
.
topics
=
params
.
topics
||
[];
params
.
topics
=
params
.
topics
||
[];
params
.
priority
=
params
.
priority
||
1000
;
params
.
priority
=
params
.
priority
||
1000
;
params
.
ttl
=
params
.
ttl
||
100
;
params
.
ttl
=
params
.
ttl
||
100
;
...
...
cmd/mist/assets/qml/views/whisper.qml
View file @
e32f7baa
...
@@ -52,7 +52,7 @@ Rectangle {
...
@@ -52,7 +52,7 @@ Rectangle {
Button
{
Button
{
text
:
"Send"
text
:
"Send"
onClicked
:
{
onClicked
:
{
shh
.
post
(
eth
.
toHex
(
data
.
text
)
,
""
,
identity
,
topics
.
text
.
split
(
","
),
500
,
50
)
shh
.
post
(
[
eth
.
toHex
(
data
.
text
)]
,
""
,
identity
,
topics
.
text
.
split
(
","
),
500
,
50
)
}
}
}
}
}
}
...
...
ui/qt/qwhisper/whisper.go
View file @
e32f7baa
...
@@ -33,8 +33,13 @@ func (self *Whisper) SetView(view qml.Object) {
...
@@ -33,8 +33,13 @@ func (self *Whisper) SetView(view qml.Object) {
self
.
view
=
view
self
.
view
=
view
}
}
func
(
self
*
Whisper
)
Post
(
data
,
to
,
from
string
,
topics
[]
string
,
priority
,
ttl
uint32
)
{
func
(
self
*
Whisper
)
Post
(
payload
[]
string
,
to
,
from
string
,
topics
[]
string
,
priority
,
ttl
uint32
)
{
msg
:=
whisper
.
NewMessage
(
fromHex
(
data
))
var
data
[]
byte
for
_
,
d
:=
range
payload
{
data
=
append
(
data
,
fromHex
(
d
)
...
)
}
msg
:=
whisper
.
NewMessage
(
data
)
envelope
,
err
:=
msg
.
Seal
(
time
.
Duration
(
priority
*
100000
),
whisper
.
Opts
{
envelope
,
err
:=
msg
.
Seal
(
time
.
Duration
(
priority
*
100000
),
whisper
.
Opts
{
Ttl
:
time
.
Duration
(
ttl
),
Ttl
:
time
.
Duration
(
ttl
),
To
:
crypto
.
ToECDSAPub
(
fromHex
(
to
)),
To
:
crypto
.
ToECDSAPub
(
fromHex
(
to
)),
...
...
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