mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
whisper: added lastTopicByte const
This commit is contained in:
parent
dfffdb8685
commit
6600165e27
2 changed files with 4 additions and 2 deletions
|
|
@ -776,6 +776,7 @@ func TestWatchers(t *testing.T) {
|
|||
func TestVariableTopics(t *testing.T) {
|
||||
InitSingleTest()
|
||||
|
||||
const lastTopicByte = 3
|
||||
var match bool
|
||||
params, err := generateMessageParams()
|
||||
if err != nil {
|
||||
|
|
@ -802,7 +803,7 @@ func TestVariableTopics(t *testing.T) {
|
|||
t.Fatalf("failed MatchEnvelope symmetric with seed %d, step %d.", seed, i)
|
||||
}
|
||||
|
||||
f.Topics[i][1]++
|
||||
f.Topics[i][lastTopicByte]++
|
||||
match = f.MatchEnvelope(env)
|
||||
if match {
|
||||
t.Fatalf("MatchEnvelope symmetric with seed %d, step %d: false positive.", seed, i)
|
||||
|
|
|
|||
|
|
@ -800,6 +800,7 @@ func TestWatchers(t *testing.T) {
|
|||
func TestVariableTopics(t *testing.T) {
|
||||
InitSingleTest()
|
||||
|
||||
const lastTopicByte = 3
|
||||
var match bool
|
||||
params, err := generateMessageParams()
|
||||
if err != nil {
|
||||
|
|
@ -826,7 +827,7 @@ func TestVariableTopics(t *testing.T) {
|
|||
t.Fatalf("failed MatchEnvelope symmetric with seed %d, step %d.", seed, i)
|
||||
}
|
||||
|
||||
f.Topics[i][1]++
|
||||
f.Topics[i][lastTopicByte]++
|
||||
match = f.MatchEnvelope(env)
|
||||
if match {
|
||||
t.Fatalf("MatchEnvelope symmetric with seed %d, step %d: false positive.", seed, i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue