whisper: interface changed to simplify the transition to v5
* whisper: mailserver test introduced, refactoring * whisper: validation test updated * whisper: max number of peers fixed * whisper: verification bug fixed * whisper: esthetic fix * whisper: interface changed to simplify the transition to v5 * whisper: preparation for version switch
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
func TestWhisperBasic(t *testing.T) {
|
||||
w := NewWhisper(nil)
|
||||
w := New()
|
||||
p := w.Protocols()
|
||||
shh := p[0]
|
||||
if shh.Name != ProtocolName {
|
||||
@@ -110,7 +110,7 @@ func TestWhisperBasic(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWhisperIdentityManagement(t *testing.T) {
|
||||
w := NewWhisper(nil)
|
||||
w := New()
|
||||
id1 := w.NewIdentity()
|
||||
id2 := w.NewIdentity()
|
||||
pub1 := common.ToHex(crypto.FromECDSAPub(&id1.PublicKey))
|
||||
@@ -186,7 +186,7 @@ func TestWhisperSymKeyManagement(t *testing.T) {
|
||||
InitSingleTest()
|
||||
|
||||
var k1, k2 []byte
|
||||
w := NewWhisper(nil)
|
||||
w := New()
|
||||
id1 := string("arbitrary-string-1")
|
||||
id2 := string("arbitrary-string-2")
|
||||
|
||||
@@ -304,7 +304,7 @@ func TestWhisperSymKeyManagement(t *testing.T) {
|
||||
func TestExpiry(t *testing.T) {
|
||||
InitSingleTest()
|
||||
|
||||
w := NewWhisper(nil)
|
||||
w := New()
|
||||
w.test = true
|
||||
w.Start(nil)
|
||||
defer w.Stop()
|
||||
|
Reference in New Issue
Block a user