mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
whisper: validation test updated
This commit is contained in:
parent
e9e73e03c0
commit
ab64663b33
1 changed files with 6 additions and 0 deletions
|
|
@ -152,6 +152,12 @@ func singleRequest(t *testing.T, server *WMailServer, env *whisper.Envelope, p *
|
||||||
if exist != expect {
|
if exist != expect {
|
||||||
t.Fatalf("error: exist = %v, seed: %d.", exist, seed)
|
t.Fatalf("error: exist = %v, seed: %d.", exist, seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
src[0]++
|
||||||
|
ok, lower, upper, topic = server.validateRequest(src, request)
|
||||||
|
if ok {
|
||||||
|
t.Fatalf("request validation false positive, seed: %d.", seed)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func createRequest(t *testing.T, p *ServerTestParams) *whisper.Envelope {
|
func createRequest(t *testing.T, p *ServerTestParams) *whisper.Envelope {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue