Skip to content

Commit

Permalink
#8 bumped minimum fee to 5000 sat
Browse files Browse the repository at this point in the history
  • Loading branch information
jim618 committed Oct 14, 2015
1 parent b514544 commit 9647af0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class FeeService {

private static final Logger log = LoggerFactory.getLogger(FeeService.class);

public static final Coin MINIMUM_FEE_PER_KB = Coin.valueOf(1000); // Slightly higher than the minimum relay fee (1000 sat per KB) as per Bitcoin Core 0.9
public static final Coin MINIMUM_FEE_PER_KB = Coin.valueOf(5000); // The minimum relay fee (5000 sat per KB) as per https://www.reddit.com/r/Bitcoin/comments/3oecqm/psa_to_address_mempool_flooding_bitcoin_core/
public static final Coin DEFAULT_FEE_PER_KB = Coin.valueOf(10000); // 0.1 mBTC per KB - a long used fee structure which works as of spam attacks of July 2015
public static final Coin MAXIMUM_FEE_PER_KB = Coin.valueOf(50000); // 0.5 mBTC per KB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void testCalculateFeeStateWithDummyURL() throws Exception {
public void checkFeePerKB() {

// Check minimum
assertThat(Coin.valueOf(1000).equals(FeeService.MINIMUM_FEE_PER_KB)).isTrue();
assertThat(Coin.valueOf(5000).equals(FeeService.MINIMUM_FEE_PER_KB)).isTrue();

// Check default
assertThat(Coin.valueOf(10000).equals(FeeService.DEFAULT_FEE_PER_KB)).isTrue();
Expand All @@ -177,7 +177,7 @@ public void checkFeePerKB() {

// Too small
assertThat(FeeService.MINIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(-1))).isTrue();
assertThat(FeeService.MINIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(999))).isTrue();
assertThat(FeeService.MINIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(4999))).isTrue();

// Just right
assertThat(Coin.valueOf(12345).equals(FeeService.normaliseRawFeePerKB(12345))).isTrue();
Expand Down

0 comments on commit 9647af0

Please sign in to comment.