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

Litecoin minNonDustOutput is wrong? #21

Open
mrosseel opened this issue Jun 6, 2017 · 1 comment
Open

Litecoin minNonDustOutput is wrong? #21

mrosseel opened this issue Jun 6, 2017 · 1 comment

Comments

@mrosseel
Copy link
Contributor

mrosseel commented Jun 6, 2017

According to the following site:
https://litecoin.info/Transaction_fees
The minimum non-dust output of litecoin is 0.001 LTC.

In the AbstractLitecoinParams.java file this parameter is set to Coin.COIN:

@Override
public Coin getMinNonDustOutput() {
    return Coin.COIN;
}

Which is 1 LTC:

/**
 * The number of satoshis equal to one bitcoin.
 */
private static final long COIN_VALUE = LongMath.pow(10, SMALLEST_UNIT_EXPONENT);

/**
 * One Bitcoin.
 */
public static final Coin COIN = Coin.valueOf(COIN_VALUE);

Note: in Doge it's also set to 1 Doge (litecoin probably copy-pasted this), in namecoin it's set to the bitcoin default Transaction.MIN_NONDUST_OUTPUT; which is 2730 satoshi.

Proposal:

@Override
public Coin getMinNonDustOutput() {
    return Coin.valueof(100000);
}

Can anyone confirm this interpretation?
Should the other values in that table be checked as well?

@JeremyRand
Copy link
Contributor

When I created the Namecoin params, I just copied what BitcoinJ did for Bitcoin. I actually don't see the constant 2730 in either the Bitcoin Core or Namecoin Core source code. I do see this commit: bitcoin/bitcoin@5f46a7d , which removed a constant of 2730. So maybe the Bitcoin params in upstream BitcoinJ also need fixing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants