mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 22:24:21 +01:00
contractcourt/commit_sweep_resolver: set sweep witness type based on witness script
We use the fact that we can tell whether the commit is local or remote by inspecting the witness script. We cannot use the maturity delay anymore, as we can have delayed to_remote outputs also now. Co-authored-by: Joost Jager <joost.jager@gmail.com>
This commit is contained in:
@@ -133,6 +133,7 @@ func TestCommitSweepResolverNoDelay(t *testing.T) {
|
||||
Output: &wire.TxOut{
|
||||
Value: 100,
|
||||
},
|
||||
WitnessScript: []byte{0},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -162,6 +163,7 @@ func TestCommitSweepResolverDelay(t *testing.T) {
|
||||
Output: &wire.TxOut{
|
||||
Value: amt,
|
||||
},
|
||||
WitnessScript: []byte{0},
|
||||
},
|
||||
MaturityDelay: 3,
|
||||
SelfOutPoint: outpoint,
|
||||
|
||||
Reference in New Issue
Block a user