sweep: apply fn.NewSet and fn.Map in validateInputs

This commit is contained in:
yyforyongyu
2024-03-27 19:41:24 +08:00
parent 4c13ea1747
commit 54ade99ce2
3 changed files with 49 additions and 23 deletions

View File

@@ -657,19 +657,19 @@ func TestBudgetAggregatorCreateInputSets(t *testing.T) {
pi1 := SweeperInput{
Input: mockInput1,
params: Params{
DeadlineHeight: fn.Some(int32(1)),
DeadlineHeight: fn.Some(testHeight),
},
}
pi2 := SweeperInput{
Input: mockInput2,
params: Params{
DeadlineHeight: fn.Some(int32(1)),
DeadlineHeight: fn.Some(testHeight),
},
}
pi3 := SweeperInput{
Input: mockInput3,
params: Params{
DeadlineHeight: fn.Some(int32(1)),
DeadlineHeight: fn.Some(testHeight),
},
}
pi4 := SweeperInput{
@@ -678,7 +678,7 @@ func TestBudgetAggregatorCreateInputSets(t *testing.T) {
// This input has a deadline height that is different
// from the other inputs. When grouped with other
// inputs, it will cause an error to be returned.
DeadlineHeight: fn.Some(int32(2)),
DeadlineHeight: fn.Some(testHeight + 1),
},
}