ignore default values

This commit is contained in:
Victor Shyba 2021-08-27 02:35:18 -03:00 committed by Victor Shyba
parent 57dffaa2ce
commit d713783736

View file

@ -176,6 +176,9 @@ def fix_kwargs_for_hub(**kwargs):
value_fields = {"tx_nout", "has_source", "is_signature_valid"}
opcodes = {'=': 0, '<=': 1, '>=': 2, '<': 3, '>': 4}
for key, value in list(kwargs.items()):
if value in (None, [], False):
kwargs.pop(key)
continue
if key in REPLACEMENTS:
kwargs[REPLACEMENTS[key]] = kwargs.pop(key)
key = REPLACEMENTS[key]