diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2017-12-21 22:17:27 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-12-21 22:17:27 +0800 |
commit | 38b1e8ee207da636d95bea760f577eca462307a6 (patch) | |
tree | 3bb47e1be937bcdbae94b55b772c8ce8422cf386 /whisper/whisperv6/whisper_test.go | |
parent | b0d41e386e456cefd593db303a9f5284bf08cd07 (diff) | |
download | go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar.gz go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar.bz2 go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar.lz go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar.xz go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.tar.zst go-tangerine-38b1e8ee207da636d95bea760f577eca462307a6.zip |
whisper/whisperv6: PoW requirement (#15701)
New Whisper-level message introduced (PoW requirement),
corresponding logic added, plus some tests.
Diffstat (limited to 'whisper/whisperv6/whisper_test.go')
-rw-r--r-- | whisper/whisperv6/whisper_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/whisper/whisperv6/whisper_test.go b/whisper/whisperv6/whisper_test.go index c8f3a9ed7..b391a1161 100644 --- a/whisper/whisperv6/whisper_test.go +++ b/whisper/whisperv6/whisper_test.go @@ -472,8 +472,8 @@ func TestExpiry(t *testing.T) { InitSingleTest() w := New(&DefaultConfig) - w.SetMinimumPoW(0.0000001) - defer w.SetMinimumPoW(DefaultMinimumPoW) + w.SetMinimumPowTest(0.0000001) + defer w.SetMinimumPowTest(DefaultMinimumPoW) w.Start(nil) defer w.Stop() @@ -529,7 +529,7 @@ func TestCustomization(t *testing.T) { InitSingleTest() w := New(&DefaultConfig) - defer w.SetMinimumPoW(DefaultMinimumPoW) + defer w.SetMinimumPowTest(DefaultMinimumPoW) defer w.SetMaxMessageSize(DefaultMaxMessageSize) w.Start(nil) defer w.Stop() @@ -563,7 +563,7 @@ func TestCustomization(t *testing.T) { t.Fatalf("successfully sent envelope with PoW %.06f, false positive (seed %d).", env.PoW(), seed) } - w.SetMinimumPoW(smallPoW / 2) + w.SetMinimumPowTest(smallPoW / 2) err = w.Send(env) if err != nil { t.Fatalf("failed to send envelope with seed %d: %s.", seed, err) @@ -625,7 +625,7 @@ func TestSymmetricSendCycle(t *testing.T) { InitSingleTest() w := New(&DefaultConfig) - defer w.SetMinimumPoW(DefaultMinimumPoW) + defer w.SetMinimumPowTest(DefaultMinimumPoW) defer w.SetMaxMessageSize(DefaultMaxMessageSize) w.Start(nil) defer w.Stop() @@ -714,7 +714,7 @@ func TestSymmetricSendWithoutAKey(t *testing.T) { InitSingleTest() w := New(&DefaultConfig) - defer w.SetMinimumPoW(DefaultMinimumPoW) + defer w.SetMinimumPowTest(DefaultMinimumPoW) defer w.SetMaxMessageSize(DefaultMaxMessageSize) w.Start(nil) defer w.Stop() @@ -782,7 +782,7 @@ func TestSymmetricSendKeyMismatch(t *testing.T) { InitSingleTest() w := New(&DefaultConfig) - defer w.SetMinimumPoW(DefaultMinimumPoW) + defer w.SetMinimumPowTest(DefaultMinimumPoW) defer w.SetMaxMessageSize(DefaultMaxMessageSize) w.Start(nil) defer w.Stop() |