diff --git a/swarm/pss/forwarding_test.go b/swarm/pss/forwarding_test.go index 48cbfbf4dc..084688439a 100644 --- a/swarm/pss/forwarding_test.go +++ b/swarm/pss/forwarding_test.go @@ -247,7 +247,7 @@ func testForwardMsg(t *testing.T, ps *Pss, c *testCase) { resultMap := make(map[pot.Address]int) - defer func() { sendFunc = sendMessageProd }() + defer func() { sendFunc = sendMsg }() sendFunc = func(_ *Pss, sp *network.Peer, _ *PssMsg) bool { if tries < nFails { tries++ diff --git a/swarm/pss/pss.go b/swarm/pss/pss.go index b5c783ef08..7afecb15d7 100644 --- a/swarm/pss/pss.go +++ b/swarm/pss/pss.go @@ -888,10 +888,10 @@ func (p *Pss) send(to []byte, topic Topic, msg []byte, asymmetric bool, key []by // sendFunc is a helper function that tries to send a message and returns true on success. // It is set here for usage in production, and optionally overridden in tests. -var sendFunc func(p *Pss, sp *network.Peer, msg *PssMsg) bool = sendMessageProd +var sendFunc func(p *Pss, sp *network.Peer, msg *PssMsg) bool = sendMsg // tries to send a message, returns true if successful -func sendMessageProd(p *Pss, sp *network.Peer, msg *PssMsg) bool { +func sendMsg(p *Pss, sp *network.Peer, msg *PssMsg) bool { var isPssEnabled bool info := sp.Info() for _, capability := range info.Caps {