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
e40c1c62
Commit
e40c1c62
authored
Feb 05, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API changed to use Pubkey only. Reflected that change in the rest of the api
parent
6b5f2580
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
6 deletions
+7
-6
coin.html
cmd/mist/assets/examples/coin.html
+2
-1
whisper.go
ui/qt/qwhisper/whisper.go
+1
-1
filter.go
whisper/filter.go
+1
-1
whisper.go
whisper/whisper.go
+1
-1
whisper_test.go
whisper/whisper_test.go
+1
-1
whisper.go
xeth/whisper.go
+1
-1
No files found.
cmd/mist/assets/examples/coin.html
View file @
e40c1c62
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
var
web3
=
require
(
'web3'
);
var
web3
=
require
(
'web3'
);
var
eth
=
web3
.
eth
;
var
eth
=
web3
.
eth
;
web3
.
setProvider
(
new
web3
.
providers
.
HttpSyncProvider
(
'http://localhost:8080'
));
web3
.
setProvider
(
new
web3
.
providers
.
HttpSyncProvider
(
'http://localhost:8545'
));
var
desc
=
[{
var
desc
=
[{
"name"
:
"balance(address)"
,
"name"
:
"balance(address)"
,
"type"
:
"function"
,
"type"
:
"function"
,
...
...
ui/qt/qwhisper/whisper.go
View file @
e40c1c62
...
@@ -106,7 +106,7 @@ func (self *Whisper) Messages(id int) (messages *ethutil.List) {
...
@@ -106,7 +106,7 @@ func (self *Whisper) Messages(id int) (messages *ethutil.List) {
func
filterFromMap
(
opts
map
[
string
]
interface
{})
(
f
whisper
.
Filter
)
{
func
filterFromMap
(
opts
map
[
string
]
interface
{})
(
f
whisper
.
Filter
)
{
if
to
,
ok
:=
opts
[
"to"
]
.
(
string
);
ok
{
if
to
,
ok
:=
opts
[
"to"
]
.
(
string
);
ok
{
f
.
To
=
crypto
.
ToECDSA
(
fromHex
(
to
))
f
.
To
=
crypto
.
ToECDSA
Pub
(
fromHex
(
to
))
}
}
if
from
,
ok
:=
opts
[
"from"
]
.
(
string
);
ok
{
if
from
,
ok
:=
opts
[
"from"
]
.
(
string
);
ok
{
f
.
From
=
crypto
.
ToECDSAPub
(
fromHex
(
from
))
f
.
From
=
crypto
.
ToECDSAPub
(
fromHex
(
from
))
...
...
whisper/filter.go
View file @
e40c1c62
...
@@ -3,7 +3,7 @@ package whisper
...
@@ -3,7 +3,7 @@ package whisper
import
"crypto/ecdsa"
import
"crypto/ecdsa"
type
Filter
struct
{
type
Filter
struct
{
To
*
ecdsa
.
P
rivate
Key
To
*
ecdsa
.
P
ublic
Key
From
*
ecdsa
.
PublicKey
From
*
ecdsa
.
PublicKey
Topics
[][]
byte
Topics
[][]
byte
Fn
func
(
*
Message
)
Fn
func
(
*
Message
)
...
...
whisper/whisper.go
View file @
e40c1c62
...
@@ -118,7 +118,7 @@ func (self *Whisper) GetIdentity(key *ecdsa.PublicKey) *ecdsa.PrivateKey {
...
@@ -118,7 +118,7 @@ func (self *Whisper) GetIdentity(key *ecdsa.PublicKey) *ecdsa.PrivateKey {
func
(
self
*
Whisper
)
Watch
(
opts
Filter
)
int
{
func
(
self
*
Whisper
)
Watch
(
opts
Filter
)
int
{
return
self
.
filters
.
Install
(
filter
.
Generic
{
return
self
.
filters
.
Install
(
filter
.
Generic
{
Str1
:
string
(
crypto
.
FromECDSA
(
opts
.
To
)),
Str1
:
string
(
crypto
.
FromECDSA
Pub
(
opts
.
To
)),
Str2
:
string
(
crypto
.
FromECDSAPub
(
opts
.
From
)),
Str2
:
string
(
crypto
.
FromECDSAPub
(
opts
.
From
)),
Data
:
bytesToMap
(
opts
.
Topics
),
Data
:
bytesToMap
(
opts
.
Topics
),
Fn
:
func
(
data
interface
{})
{
Fn
:
func
(
data
interface
{})
{
...
...
whisper/whisper_test.go
View file @
e40c1c62
...
@@ -11,7 +11,7 @@ func TestEvent(t *testing.T) {
...
@@ -11,7 +11,7 @@ func TestEvent(t *testing.T) {
whisper
:=
New
()
whisper
:=
New
()
id
:=
whisper
.
NewIdentity
()
id
:=
whisper
.
NewIdentity
()
whisper
.
Watch
(
Filter
{
whisper
.
Watch
(
Filter
{
To
:
id
,
To
:
&
id
.
PublicKey
,
Fn
:
func
(
msg
*
Message
)
{
Fn
:
func
(
msg
*
Message
)
{
res
<-
msg
res
<-
msg
},
},
...
...
xeth/whisper.go
View file @
e40c1c62
...
@@ -64,7 +64,7 @@ func (self *Whisper) HasIdentity(key string) bool {
...
@@ -64,7 +64,7 @@ func (self *Whisper) HasIdentity(key string) bool {
func
(
self
*
Whisper
)
Watch
(
opts
*
Options
)
int
{
func
(
self
*
Whisper
)
Watch
(
opts
*
Options
)
int
{
filter
:=
whisper
.
Filter
{
filter
:=
whisper
.
Filter
{
To
:
crypto
.
ToECDSA
(
fromHex
(
opts
.
To
)),
To
:
crypto
.
ToECDSA
Pub
(
fromHex
(
opts
.
To
)),
From
:
crypto
.
ToECDSAPub
(
fromHex
(
opts
.
From
)),
From
:
crypto
.
ToECDSAPub
(
fromHex
(
opts
.
From
)),
Topics
:
whisper
.
TopicsFromString
(
opts
.
Topics
...
),
Topics
:
whisper
.
TopicsFromString
(
opts
.
Topics
...
),
}
}
...
...
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