swarm/pss: Message handler refactor (#18169)
This commit is contained in:
@ -92,7 +92,7 @@ func testProtocol(t *testing.T) {
|
||||
lmsgC := make(chan APIMsg)
|
||||
lctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
|
||||
defer cancel()
|
||||
lsub, err := clients[0].Subscribe(lctx, "pss", lmsgC, "receive", topic)
|
||||
lsub, err := clients[0].Subscribe(lctx, "pss", lmsgC, "receive", topic, false, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -100,7 +100,7 @@ func testProtocol(t *testing.T) {
|
||||
rmsgC := make(chan APIMsg)
|
||||
rctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
|
||||
defer cancel()
|
||||
rsub, err := clients[1].Subscribe(rctx, "pss", rmsgC, "receive", topic)
|
||||
rsub, err := clients[1].Subscribe(rctx, "pss", rmsgC, "receive", topic, false, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -130,6 +130,7 @@ func testProtocol(t *testing.T) {
|
||||
log.Debug("lnode ok")
|
||||
case cerr := <-lctx.Done():
|
||||
t.Fatalf("test message timed out: %v", cerr)
|
||||
return
|
||||
}
|
||||
select {
|
||||
case <-rmsgC:
|
||||
|
Reference in New Issue
Block a user