mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
whisper: fixed the build errors
This commit is contained in:
parent
50205216f2
commit
697a50385b
1 changed files with 6 additions and 6 deletions
|
|
@ -44,12 +44,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var done chan struct{}
|
var done chan struct{}
|
||||||
var server p2p.Server
|
var server *p2p.Server
|
||||||
var shh *whisper.Whisper
|
var shh *whisper.Whisper
|
||||||
var asymKey, nodeid *ecdsa.PrivateKey // used for asymmetric decryption and signing
|
var asymKey, nodeid *ecdsa.PrivateKey // used for asymmetric decryption and signing
|
||||||
var pub *ecdsa.PublicKey // used for asymmetric encryption
|
var pub *ecdsa.PublicKey // used for asymmetric encryption
|
||||||
var symKey []byte // used for symmetric encryption
|
var symKey []byte // used for symmetric encryption
|
||||||
var filter whisper.Filter
|
|
||||||
var filterID uint32
|
var filterID uint32
|
||||||
var topic whisper.TopicType
|
var topic whisper.TopicType
|
||||||
var pow float64 = whisper.MinimumPoW
|
var pow float64 = whisper.MinimumPoW
|
||||||
|
|
@ -92,7 +91,8 @@ func padRight(str string) string {
|
||||||
|
|
||||||
func printHelp() {
|
func printHelp() {
|
||||||
fmt.Println("wchat is a stand-alone whisper node with command-line interface.")
|
fmt.Println("wchat is a stand-alone whisper node with command-line interface.")
|
||||||
fmt.Println("wchat also allows to set up a chat using either symmetric or asymmetric encryption.\n")
|
fmt.Println("wchat also allows to set up a chat using either symmetric or asymmetric encryption.")
|
||||||
|
fmt.Println()
|
||||||
fmt.Println("usage: wchat [arguments]")
|
fmt.Println("usage: wchat [arguments]")
|
||||||
fmt.Printf(" %s print this help and exit \n", padRight(argNameHelp))
|
fmt.Printf(" %s print this help and exit \n", padRight(argNameHelp))
|
||||||
fmt.Printf(" %s boostrap node: don't actively connect to peers, wait for incoming connections\n", padRight(argNameBootstrap))
|
fmt.Printf(" %s boostrap node: don't actively connect to peers, wait for incoming connections\n", padRight(argNameBootstrap))
|
||||||
|
|
@ -280,7 +280,7 @@ func initialize() {
|
||||||
nodeid = shh.NewIdentity()
|
nodeid = shh.NewIdentity()
|
||||||
}
|
}
|
||||||
|
|
||||||
server = p2p.Server{
|
server = &p2p.Server{
|
||||||
Config: p2p.Config{
|
Config: p2p.Config{
|
||||||
PrivateKey: nodeid,
|
PrivateKey: nodeid,
|
||||||
MaxPeers: 128,
|
MaxPeers: 128,
|
||||||
|
|
@ -354,8 +354,8 @@ func configureChat() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filter = whisper.Filter{KeySym: symKey, KeyAsym: asymKey, Topics: []whisper.TopicType{topic}}
|
filter := &whisper.Filter{KeySym: symKey, KeyAsym: asymKey, Topics: []whisper.TopicType{topic}}
|
||||||
filterID = shh.Watch(&filter)
|
filterID = shh.Watch(filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
func generateTopic(password, salt []byte) {
|
func generateTopic(password, salt []byte) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue