Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ flakehunter: build

flake-unit:
@$(call print, "Flake hunting unit tests.")
$(UNIT) -count=1
while [ $$? -eq 0 ]; do /bin/sh -c "$(UNIT) -count=1"; done
GOTRACEBACK=all $(UNIT) -count=1
while [ $$? -eq 0 ]; do /bin/sh -c "GOTRACEBACK=all $(UNIT) -count=1"; done

# ======
# TRAVIS
Expand Down
12 changes: 0 additions & 12 deletions contractcourt/briefcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ func (b *boltArbitratorLog) writeResolver(contractBucket *bolt.Bucket,
rType = resolverTimeout
case *htlcSuccessResolver:
rType = resolverSuccess
case *htlcOutgoingContestResolver:
rType = resolverOutgoingContest
case *htlcIncomingContestResolver:
rType = resolverIncomingContest
case *commitSweepResolver:
Expand Down Expand Up @@ -467,16 +465,6 @@ func (b *boltArbitratorLog) FetchUnresolvedContracts() ([]ContractResolver, erro

res = successRes

case resolverOutgoingContest:
outContestRes := &htlcOutgoingContestResolver{
htlcTimeoutResolver: htlcTimeoutResolver{},
}
if err := outContestRes.Decode(resReader); err != nil {
return err
}

res = outContestRes

case resolverIncomingContest:
inContestRes := &htlcIncomingContestResolver{
htlcSuccessResolver: htlcSuccessResolver{},
Expand Down
32 changes: 1 addition & 31 deletions contractcourt/channel_arbitrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ func (c *ChannelArbitrator) prepContractResolutions(htlcActions ChainActionMap,
// If we can timeout the HTLC directly, then we'll create the
// proper resolver to do so, who will then cancel the packet
// backwards.
case HtlcTimeoutAction:
case HtlcTimeoutAction, HtlcOutgoingWatchAction:
for _, htlc := range htlcs {
htlcOp := wire.OutPoint{
Hash: commitHash,
Expand Down Expand Up @@ -1212,36 +1212,6 @@ func (c *ChannelArbitrator) prepContractResolutions(htlcActions ChainActionMap,
}
htlcResolvers = append(htlcResolvers, resolver)
}

// Finally, if this is an outgoing HTLC we've sent, then we'll
// launch a resolver to watch for the pre-image (and settle
// backwards), or just timeout.
case HtlcOutgoingWatchAction:
for _, htlc := range htlcs {
htlcOp := wire.OutPoint{
Hash: commitHash,
Index: uint32(htlc.OutputIndex),
}

resolution, ok := outResolutionMap[htlcOp]
if !ok {
log.Errorf("ChannelArbitrator(%v) unable to find "+
"outgoing resolution: %v",
c.cfg.ChanPoint, htlcOp)
continue
}

resKit.Quit = make(chan struct{})
resolver := &htlcOutgoingContestResolver{
htlcTimeoutResolver{
htlcResolution: resolution,
broadcastHeight: height,
htlcIndex: htlc.HtlcIndex,
ResolverKit: resKit,
},
}
htlcResolvers = append(htlcResolvers, resolver)
}
}
}

Expand Down
Loading