1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-23 14:40:34 +01:00

update CSV timeout-out conversion to match bitcoin's

This commit is contained in:
sstone 2016-02-25 12:08:25 +01:00
parent b3f5ce4e38
commit 14e36e9ac8

View file

@ -13,8 +13,7 @@ object Scripts {
def locktime2long_csv(in: locktime): Long = in match {
case locktime(Blocks(blocks)) => blocks
// FIXME : we adopt Element's alpha convention while BIP68 is not enabled
case locktime(Seconds(seconds)) => 500000000 + seconds
case locktime(Seconds(seconds)) => (seconds / 512) & TxIn.SEQUENCE_LOCKTIME_TYPE_FLAG
}
def locktime2long_cltv(in: locktime): Long = in match {