From d3aa5e638d875dce2a82bdf79af5225f9f672a15 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Fri, 7 Aug 2020 12:48:40 -0400 Subject: [PATCH] refactor: remove unused method --- paychmgr/simple.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/paychmgr/simple.go b/paychmgr/simple.go index fe59a1944..61c0a8fb1 100644 --- a/paychmgr/simple.go +++ b/paychmgr/simple.go @@ -143,32 +143,6 @@ func (ca *channelAccessor) msgWaitComplete(mcid cid.Cid, err error) { } } -// callOnComplete calls the onComplete callback for a task -func (ca *channelAccessor) callOnComplete(mcid cid.Cid, err error, cb onCompleteFn) { - if cb == nil { - return - } - - if err != nil { - go cb(&paychFundsRes{err: err}) - return - } - - // Get the channel address - ci, storeErr := ca.store.ByMessageCid(mcid) - if storeErr != nil { - log.Errorf("getting channel by message cid: %s", err) - go cb(&paychFundsRes{err: storeErr}) - return - } - - if ci.Channel == nil { - panic("channel address is nil when calling onComplete callback") - } - - go cb(&paychFundsRes{channel: *ci.Channel, mcid: mcid, err: err}) -} - // processTask checks the state of the channel and takes appropriate action // (see description of getPaych). // Note that processTask may be called repeatedly in the same state, and should