cnct/contract_resolvers: propagate checkpoint failures

This commit is contained in:
Conner Fromknecht 2018-09-18 04:03:47 -07:00
parent f957b78c0b
commit f9cec4a67b
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -171,6 +171,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
if err := h.Checkpoint(h); err != nil {
log.Errorf("unable to Checkpoint: %v", err)
return nil, err
}
}
@ -485,6 +486,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
// Checkpoint our state.
if err := h.Checkpoint(h); err != nil {
log.Errorf("unable to Checkpoint: %v", err)
return nil, err
}
}
@ -559,6 +561,7 @@ func (h *htlcSuccessResolver) Resolve() (ContractResolver, error) {
if err := h.Checkpoint(h); err != nil {
log.Errorf("unable to Checkpoint: %v", err)
return nil, err
}
}
@ -1323,6 +1326,7 @@ func (c *commitSweepResolver) Resolve() (ContractResolver, error) {
if err := c.Checkpoint(c); err != nil {
log.Errorf("unable to Checkpoint: %v", err)
return nil, err
}
case <-c.Quit:
return nil, fmt.Errorf("quitting")