Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set nLockTime for Komodo transactions #1825

Merged
merged 3 commits into from Feb 26, 2019

Conversation

Projects
None yet
4 participants
@lukechilds
Copy link
Contributor

lukechilds commented Feb 23, 2019

This PR sets nLockTime to a value slightly in the past for Komodo transactions to enable reward claiming on UTXOs created by Ledger Live.

I'm aware you don't want to support the actual claim functionality inside Ledger Live, that's why we built our Ledger reward claiming app as an external web app (https://github.com/atomiclabs/ledger-kmd-reward-claim). However, the only requirement for a UTXO to be able to claim interest is that it has nLockTime set.

All Komodo wallets set nLockTime to a value slightly in the past for this reason. (It's actually a good idea to always set nLockTime for other reasons too https://bitcoin.stackexchange.com/a/48385/90269). But due to the fact that Ledger Live doesn't set nLockTime, as soon as the users spends a UTXO via Ledger Live, they can't earn any rewards on their change UTXO.

Type

Feature

Context

LedgerHQ/ledger-app-btc#84

Parts of the app affected / Test plan

Only Komodo transactions are affected. Currently, Komodo transactions don't have nLockTime set. If you test this PR and make a Komodo transaction, you'll see nLockTime is now set to a value slightly in the past (unixtime - 777).

It wouldn't be a bad idea to do this for all currencies, not just Komodo (https://bitcoin.stackexchange.com/a/48385/90269). But I've limited it to just Komodo for this PR to avoid making any decisions for you.

@lukechilds lukechilds referenced this pull request Feb 23, 2019

Closed

Locktime #6

@ElvisPresly

This comment has been minimized.

Copy link

ElvisPresly commented Feb 23, 2019

It's a good idea

[Feedback] Don't explicitly set lockTime as undefined
Co-Authored-By: lukechilds <lukechilds123@gmail.com>
@gre

This comment has been minimized.

Copy link
Member

gre commented Feb 23, 2019

Can you run yarn prettier and commit?
Thanks.

We'll test a bit this PR next week

@lukechilds

This comment has been minimized.

Copy link
Contributor Author

lukechilds commented Feb 23, 2019

Can you run yarn prettier and commit?

Done.

We'll test a bit this PR next week

Awesome!

@gre

gre approved these changes Feb 23, 2019

@gre gre requested a review from Arnaud97234 Feb 23, 2019

@gre gre merged commit 35c6a88 into LedgerHQ:develop Feb 26, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@gre gre referenced this pull request Feb 26, 2019

Merged

Preparing 1.5.0 #1829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.