mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
contractcourt+sweep: offer direct-preimage spend via SweepInput
This commit removes the method `CreateSweepTx` and makes sure when sweeping the htlc output via the direct-preimage spend, it's offered via the `SweepInput` interface.
This commit is contained in:
@@ -181,17 +181,14 @@ func TestHtlcSuccessSingleStage(t *testing.T) {
|
||||
// that our sweep succeeded.
|
||||
preCheckpoint: func(ctx *htlcResolverTestContext,
|
||||
_ bool) error {
|
||||
// The resolver will create and publish a sweep
|
||||
// tx.
|
||||
resolver := ctx.resolver.(*htlcSuccessResolver)
|
||||
resolver.Sweeper.(*mockSweeper).
|
||||
createSweepTxChan <- sweepTx
|
||||
|
||||
// Confirm the sweep, which should resolve it.
|
||||
ctx.notifier.ConfChan <- &chainntnfs.TxConfirmation{
|
||||
Tx: sweepTx,
|
||||
BlockHeight: testInitialBlockHeight - 1,
|
||||
// The resolver will offer the input to the
|
||||
// sweeper.
|
||||
details := &chainntnfs.SpendDetail{
|
||||
SpendingTx: sweepTx,
|
||||
SpenderTxHash: &sweepTxid,
|
||||
}
|
||||
ctx.notifier.SpendChan <- details
|
||||
|
||||
return nil
|
||||
},
|
||||
|
Reference in New Issue
Block a user