Repo Added
|
Files
88
|
Badge
README BADGES
|
CirrusCI
swaps: add explicit check that (onchain_locktime < LN_locktime) This was already implicitly checked. This diff makes the check explicit, and serves as an additional sanity-check. - for client-forward-swaps, we have - "cltv safety requirement: (onchain_locktime < LN_locktime), otherwise client is vulnerable" - server chooses onchain locktime delta = 70 https://github.com/spesmilo/electrum/blob/<a class=hub.com/spesmilo/electrum/commit/<a class="double-link" href="https://git"><a class=hub.com/spesmilo/electrum/commit/<a class="double-link" href="https://git"><a class=hub.com/spesmilo/electrum/commit/<a class="double-link" href="https://git"><a class=hub.com/spesmilo/electrum/commit/<a class="double-link" href="https://git"><a class=hub.com/spesmilo/electrum/commit/71255c1e735cdfcd881e045b9f2f6bc6b599f459">71255c1e7/electrum/submarine_swaps.py#L701 - client checks that onchain locktime delta is <100 https://github.com/spesmilo/electrum/blob/71255c1e735cdfcd881e045b9f2f6bc6b599f459/electrum/submarine_swaps.py#L887 - client chooses LN locktime delta = 432 https://github.com/spesmilo/electrum/blob/71255c1e735cdfcd881e045b9f2f6bc6b599f459/electrum/submarine_swaps.py#L907 - for client-reverse-swaps, we have - "cltv safety requirement: (onchain_locktime < LN_locktime), otherwise server is vulnerable" - server chooses onchain locktime delta = 70 https://github.com/spesmilo/electrum/blob/71255c1e735cdfcd881e045b9f2f6bc6b599f459/electrum/submarine_swaps.py#L598 - server chooses LN locktime delta: unset, i.e. our default of 147 https://github.com/spesmilo/electrum/blob/71255c1e735cdfcd881e045b9f2f6bc6b599f459/electrum/submarine_swaps.py#L612 https://github.com/spesmilo/electrum/blob/71255c1e735cdfcd881e045b9f2f6bc6b599f459/electrum/lnworker.py#L2273
1 of 7 new or added lines in 1 file covered. (14.29%)
84 existing lines in 37 files now uncovered.22820 of 37213 relevant lines covered (61.32%)
3.06 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|