mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-07 14:00:08 +02:00
sweep: assign deadline values to inputs in handleNewInput
This commit changes how we transform from a deadline option to a concrete deadline value - previously this is done when we decide to cluster inputs, and we now move it to a step earlier - once an input is received via `SweeperInput`, we will immediately transform its optional deadline into a real value. For inputs that come with a deadline option, since the Some will be used, it makes no difference. For inputs with None as their deadlines, we need this change to make sure the default deadlines are assigned accurately.
This commit is contained in:
@ -2747,9 +2747,7 @@ func TestSweepPendingInputs(t *testing.T) {
|
||||
pis := make(InputsMap)
|
||||
|
||||
// Mock the aggregator to return the mocked input sets.
|
||||
expectedDeadlineUsed := testHeight + DefaultDeadlineDelta
|
||||
aggregator.On("ClusterInputs", pis,
|
||||
expectedDeadlineUsed).Return([]InputSet{
|
||||
aggregator.On("ClusterInputs", pis).Return([]InputSet{
|
||||
setNeedWallet, normalSet,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user