MCPcopy Create free account
hub / github.com/ElementsProject/lightning / move_matches

Function move_matches

tests/utils.py:80–96  ·  view source on GitHub ↗
(exp, mv)

Source from the content-addressed store, hash-verified

78
79
80def move_matches(exp, mv):
81 if mv['type'] != exp['type']:
82 return False
83 if Millisatoshi(mv['credit_msat']) != Millisatoshi(exp['credit_msat']):
84 return False
85 if Millisatoshi(mv['debit_msat']) != Millisatoshi(exp['debit_msat']):
86 return False
87 if sorted(mv['tags']) != sorted(exp['tags']):
88 return False
89 if 'fees_msat' in exp:
90 if 'fees_msat' not in mv:
91 return False
92 if Millisatoshi(mv['fees_msat']) != Millisatoshi(exp['fees_msat']):
93 return False
94 elif 'fees_msat' in mv:
95 return False
96 return True
97
98
99def calc_lease_fee(amt, feerate, rates):

Callers 1

check_coin_movesFunction · 0.85

Calls 1

MillisatoshiClass · 0.90

Tested by

no test coverage detected