coincontrol: Replace HasInputWeight with returning optional from Get

This commit is contained in:
Andrew Chow
2023-01-23 16:59:25 -05:00
parent e1abfb5b20
commit 5321786b9d
4 changed files with 17 additions and 36 deletions

View File

@@ -76,10 +76,7 @@ FUZZ_TARGET(coincontrol, .init = initialize_coincontrol)
(void)coin_control.SetInputWeight(out_point, weight);
},
[&] {
// Condition to avoid the assertion in GetInputWeight
if (coin_control.HasInputWeight(out_point)) {
(void)coin_control.GetInputWeight(out_point);
}
(void)coin_control.GetInputWeight(out_point);
});
}
}