return on all err conditions
This commit is contained in:
parent
76b5c8b145
commit
e4bed4d963
@ -63,18 +63,21 @@ func (pm *Manager) waitForPaychCreateMsg(ctx context.Context, mcid cid.Cid) {
|
|||||||
|
|
||||||
if mwait.Receipt.ExitCode != 0 {
|
if mwait.Receipt.ExitCode != 0 {
|
||||||
log.Errorf("payment channel creation failed (exit code %d)", mwait.Receipt.ExitCode)
|
log.Errorf("payment channel creation failed (exit code %d)", mwait.Receipt.ExitCode)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var decodedReturn init_.ExecReturn
|
var decodedReturn init_.ExecReturn
|
||||||
err = decodedReturn.UnmarshalCBOR(bytes.NewReader(mwait.Receipt.Return))
|
err = decodedReturn.UnmarshalCBOR(bytes.NewReader(mwait.Receipt.Return))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
paychaddr := decodedReturn.RobustAddress
|
paychaddr := decodedReturn.RobustAddress
|
||||||
|
|
||||||
ci, err := pm.loadOutboundChannelInfo(ctx, paychaddr)
|
ci, err := pm.loadOutboundChannelInfo(ctx, paychaddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("loading channel info: %w", err)
|
log.Errorf("loading channel info: %w", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := pm.store.trackChannel(ci); err != nil {
|
if err := pm.store.trackChannel(ci); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user