policy: lower min relay fee to 1000.

This commit is contained in:
Christopher Jeffrey 2016-12-08 02:11:33 -08:00
parent c86311029c
commit ee7d39ce81
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 20 additions and 14 deletions

View File

@ -1280,7 +1280,7 @@ function CoinSelector(tx, options) {
this.height = -1; this.height = -1;
this.confirmations = -1; this.confirmations = -1;
this.hardFee = -1; this.hardFee = -1;
this.rate = constants.tx.MIN_RELAY; this.rate = 10000;
this.maxFee = -1; this.maxFee = -1;
this.round = false; this.round = false;
this.changeAddress = null; this.changeAddress = null;

View File

@ -417,7 +417,7 @@ exports.tx = {
MAX_WEIGHT: 400000, MAX_WEIGHT: 400000,
MIN_FEE: 10000, MIN_FEE: 10000,
MAX_FEE: exports.COIN / 10, MAX_FEE: exports.COIN / 10,
MIN_RELAY: 10000, MIN_RELAY: 1000,
BARE_MULTISIG: true, BARE_MULTISIG: true,
FREE_THRESHOLD: exports.COIN * 144 / 250, FREE_THRESHOLD: exports.COIN * 144 / 250,
MAX_SIGOPS: exports.block.MAX_SIGOPS / 5, MAX_SIGOPS: exports.block.MAX_SIGOPS / 5,
@ -425,8 +425,6 @@ exports.tx = {
COINBASE_MATURITY: 100 COINBASE_MATURITY: 100
}; };
exports.tx.DUST_THRESHOLD = 182 * exports.tx.MIN_RELAY / 1000 * 3;
/** /**
* Script-related constants. * Script-related constants.
* @enum {Number} * @enum {Number}

View File

@ -426,7 +426,7 @@ main.rpcPort = 8332;
* @default * @default
*/ */
main.minRelay = 10000; main.minRelay = 1000;
/** /**
* Default normal relay rate. * Default normal relay rate.
@ -635,7 +635,7 @@ testnet.requireStandard = false;
testnet.rpcPort = 18332; testnet.rpcPort = 18332;
testnet.minRelay = 10000; testnet.minRelay = 1000;
testnet.feeRate = 20000; testnet.feeRate = 20000;
@ -793,7 +793,7 @@ regtest.requireStandard = false;
regtest.rpcPort = 18332; regtest.rpcPort = 18332;
regtest.minRelay = 10000; regtest.minRelay = 1000;
regtest.feeRate = 20000; regtest.feeRate = 20000;
@ -918,7 +918,7 @@ segnet3.requireStandard = false;
segnet3.rpcPort = 28332; segnet3.rpcPort = 28332;
segnet3.minRelay = 10000; segnet3.minRelay = 1000;
segnet3.feeRate = 20000; segnet3.feeRate = 20000;
@ -1067,7 +1067,7 @@ segnet4.requireStandard = false;
segnet4.rpcPort = 28902; segnet4.rpcPort = 28902;
segnet4.minRelay = 10000; segnet4.minRelay = 1000;
segnet4.feeRate = 20000; segnet4.feeRate = 20000;
@ -1226,7 +1226,7 @@ simnet.requireStandard = false;
simnet.rpcPort = 18556; simnet.rpcPort = 18556;
simnet.minRelay = 10000; simnet.minRelay = 1000;
simnet.feeRate = 20000; simnet.feeRate = 20000;

View File

@ -503,8 +503,12 @@ describe('Wallet', function() {
assert(t2.verify()); assert(t2.verify());
assert.equal(t2.getInputValue(), 16380); assert.equal(t2.getInputValue(), 16380);
assert.equal(t2.getOutputValue(), 5460);
assert.equal(t2.getFee(), 10920); // assert.equal(t2.getOutputValue(), 5460); // minrelay=10000
// assert.equal(t2.getFee(), 10920); // minrelay=10000
assert.equal(t2.getOutputValue(), 6380); // minrelay=1000
assert.equal(t2.getFee(), 10000); // minrelay=1000
// Create new transaction // Create new transaction
t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000); t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000);
@ -840,8 +844,12 @@ describe('Wallet', function() {
assert(t2.verify()); assert(t2.verify());
assert.equal(t2.getInputValue(), 16380); assert.equal(t2.getInputValue(), 16380);
assert.equal(t2.getOutputValue(), 5460);
assert.equal(t2.getFee(), 10920); // assert.equal(t2.getOutputValue(), 5460); // minrelay=10000
// assert.equal(t2.getFee(), 10920); // minrelay=10000
assert.equal(t2.getOutputValue(), 6380); // minrelay=1000
assert.equal(t2.getFee(), 10000); // minrelay=1000
// Create new transaction // Create new transaction
t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000); t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000);