Skip to content

Commit 1a11e3b

Browse files
committed
pss/outbox: Removed SetForwardFunction
1 parent 23b424e commit 1a11e3b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

pss/outbox/outbox.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ func (o *Outbox) processOutbox() {
8585
}(slot)
8686
}
8787
}
88-
func (o *Outbox) SetForwardFunction(forwardFunc forwardFunction) {
89-
o.forwardFunc = forwardFunc
90-
}
9188

9289
func (o *Outbox) msg(slot int) *outboxMsg {
9390
return o.queue[slot]

pss/pss_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,8 @@ func TestAddressMatchProx(t *testing.T) {
262262
if err != nil {
263263
t.Fatal(err.Error())
264264
}
265-
// enqueue method now is blocking, so we need always somebody processing the outbox
266-
mockForwardFunc :=
267-
func(msg *message.Message) error {
268-
return nil
269-
}
270265

271-
ps.outbox.SetForwardFunction(mockForwardFunc)
266+
//Forwarding will fail. Since in this test we are not relying on forwarding, but just handling, the test is valid
272267
ps.outbox.Start()
273268

274269
// create kademlia peers, so we have peers both inside and outside minproxlimit
@@ -374,6 +369,7 @@ func TestAddressMatchProx(t *testing.T) {
374369

375370
log.Trace("withprox addrs", "local", localAddr, "remote", remoteAddr)
376371
ps.handle(context.TODO(), pssMsg)
372+
377373
if (!expects[i] && prevReceive != receives) || (expects[i] && prevReceive == receives) {
378374
t.Fatalf("expected distance %d recipient %v when prox is set for handler", distance, expects[i])
379375
}

0 commit comments

Comments
 (0)