AbstractLitecoinParams extends NetworkParameters implements AltcoinNetworkParameters { @Override public Coin getBlockSubsidy(final int height) { return BASE_SUBSIDY.shiftRight(height / getSubsidyDecreaseBlockCount()); } AbstractLitecoinParams(); @Override Coin getBlockSubsidy(final int height); @Override Sha256Hash getBlockDifficultyHash(Block block); MonetaryFormat getMonetaryFormat(); @Override Coin getMaxMoney(); @Override Coin getMinNonDustOutput(); @Override String getUriScheme(); @Override boolean hasMaxMoney(); @Override void checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock, BlockStore blockStore); long calculateNewDifficultyTarget(StoredBlock storedPrev, Block nextBlock, BlockStore blockStore); @Override AltcoinSerializer getSerializer(boolean parseRetain); @Override int getProtocolVersionNum(final ProtocolVersion version); boolean allowMinDifficultyBlocks(); int getTargetSpacing(); static final MonetaryFormat LITE; static final MonetaryFormat MLITE; static final MonetaryFormat LITEOSHI; static final int LITE_TARGET_TIMESPAN; static final int LITE_TARGET_SPACING; static final int LITE_INTERVAL; static final long MAX_LITECOINS; static final Coin MAX_LITECOIN_MONEY; static final String CODE_LITE; static final String CODE_MLITE; static final String CODE_LITEOSHI; static final String ID_LITE_MAINNET; static final String ID_LITE_TESTNET; static final String ID_LITE_REGTEST; static final int LITECOIN_PROTOCOL_VERSION_MINIMUM; static final int LITECOIN_PROTOCOL_VERSION_CURRENT; }
@Test public void shouldCalculateSubsidy() { assertEquals(Coin.COIN.multiply(50), params.getBlockSubsidy(0)); assertEquals(Coin.COIN.multiply(50), params.getBlockSubsidy(839999)); assertEquals(Coin.COIN.multiply(25), params.getBlockSubsidy(840000)); assertEquals(Coin.COIN.multiply(25), params.getBlockSubsidy(1679999)); }