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

Function move_matches

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

Source from the content-addressed store, hash-verified

84
85
86def move_matches(exp, mv):
87 if mv['type'] != exp['type']:
88 return False
89 if Millisatoshi(mv['credit_msat']) != Millisatoshi(exp['credit_msat']):
90 return False
91 if Millisatoshi(mv['debit_msat']) != Millisatoshi(exp['debit_msat']):
92 return False
93 if mv['tags'] != exp['tags']:
94 return False
95 if 'fees_msat' in exp:
96 if 'fees_msat' not in mv:
97 return False
98 if Millisatoshi(mv['fees_msat']) != Millisatoshi(exp['fees_msat']):
99 return False
100 elif 'fees_msat' in mv:
101 return False
102 return True
103
104
105def calc_lease_fee(amt, feerate, rates):

Callers 1

check_coin_movesFunction · 0.85

Calls 1

MillisatoshiClass · 0.90

Tested by

no test coverage detected