whisper: update code to address Vlad's command

This commit is contained in:
Guillaume Ballet 2018-04-16 17:35:53 +02:00
parent 95d4f6f833
commit 2205d77508

View file

@ -201,8 +201,7 @@ func initialize() {
if len(*argIP) == 0 {
argIP = scanLineA("Please enter your IP and port (e.g. 127.0.0.1:30348): ")
}
} else {
if *argPort == 0 {
} else if *argPort == 0 {
for {
fmt.Print("Please enter the port to use: ")
if _, err := fmt.Scanf("%d", argPort); err != nil || *argPort >= 1024 {
@ -210,9 +209,7 @@ func initialize() {
}
}
}
}
} else {
if *useLibP2P {
} else if *useLibP2P {
var libp2pbootstrap *string
for libp2pbootstrap == nil {
libp2pbootstrap = scanLineA("Please enter the bootstrap node's address: ")
@ -230,7 +227,6 @@ func initialize() {
peer := discover.MustParseNode(*argEnode)
peers = append(peers, peer)
}
}
if *mailServerMode {
if len(msPassword) == 0 {