swarm/pss: func name changed

This commit is contained in:
Vlad 2018-12-20 12:38:59 +04:00
parent a7350bd7df
commit 3e7aa78e51
2 changed files with 3 additions and 3 deletions

View file

@ -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++

View file

@ -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 {