multi: remove returned error from WipeChannel

The linter complains about not checking the return value from
WipeChannel in certain places. Instead of checking we simply remove the
returned error because the in-memory modifications cannot fail.
This commit is contained in:
Conner Fromknecht
2020-04-02 17:39:29 -07:00
parent 9385b8cdc6
commit ec784db511
8 changed files with 12 additions and 41 deletions

View File

@ -2259,10 +2259,7 @@ func (r *rpcServer) AbandonChannel(ctx context.Context,
}
remotePub := dbChan.IdentityPub
if peer, err := r.server.FindPeer(remotePub); err == nil {
if err := peer.WipeChannel(chanPoint); err != nil {
return nil, fmt.Errorf("unable to wipe "+
"channel state: %v", err)
}
peer.WipeChannel(chanPoint)
}
default: