Skip to content

Commit

Permalink
contractcourt/chain_watcher: don't pass breach txn to NewBreachRetrib…
Browse files Browse the repository at this point in the history
…ution
  • Loading branch information
cfromknecht committed Jan 8, 2019
1 parent 52521c1 commit 8c2136d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contractcourt/chain_watcher.go
Expand Up @@ -725,18 +725,14 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail
return fmt.Errorf("unable to mark channel as borked: %v", err)
}

var (
commitTxBroadcast = spendEvent.SpendingTx
spendHeight = uint32(spendEvent.SpendingHeight)
)
spendHeight := uint32(spendEvent.SpendingHeight)

// Create a new reach retribution struct which contains all the data
// needed to swiftly bring the cheating peer to justice.
//
// TODO(roasbeef): move to same package
retribution, err := lnwallet.NewBreachRetribution(
c.cfg.chanState, broadcastStateNum, commitTxBroadcast,
spendHeight,
c.cfg.chanState, broadcastStateNum, spendHeight,
)
if err != nil {
return fmt.Errorf("unable to create breach retribution: %v", err)
Expand Down

0 comments on commit 8c2136d

Please sign in to comment.