mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
fee reserves cant be negative (#260)
This commit is contained in:
@@ -51,5 +51,5 @@ def calculate_number_of_blank_outputs(fee_reserve_sat: int):
|
||||
The formula ensures that any overpaid fees can be represented by the blank outputs,
|
||||
see NUT-08 for details.
|
||||
"""
|
||||
assert fee_reserve_sat > 0, "Fee reserve has to be positive."
|
||||
assert fee_reserve_sat >= 0, "Fee reserve can't be negative."
|
||||
return max(math.ceil(math.log2(fee_reserve_sat)), 1)
|
||||
|
||||
Reference in New Issue
Block a user