diff --git a/lib/primitives/mtx.js b/lib/primitives/mtx.js index 615b5cc2..4014e4e4 100644 --- a/lib/primitives/mtx.js +++ b/lib/primitives/mtx.js @@ -1280,7 +1280,7 @@ function CoinSelector(tx, options) { this.height = -1; this.confirmations = -1; this.hardFee = -1; - this.rate = constants.tx.MIN_RELAY; + this.rate = 10000; this.maxFee = -1; this.round = false; this.changeAddress = null; diff --git a/lib/protocol/constants.js b/lib/protocol/constants.js index 8ebd81bf..910a2afb 100644 --- a/lib/protocol/constants.js +++ b/lib/protocol/constants.js @@ -417,7 +417,7 @@ exports.tx = { MAX_WEIGHT: 400000, MIN_FEE: 10000, MAX_FEE: exports.COIN / 10, - MIN_RELAY: 10000, + MIN_RELAY: 1000, BARE_MULTISIG: true, FREE_THRESHOLD: exports.COIN * 144 / 250, MAX_SIGOPS: exports.block.MAX_SIGOPS / 5, @@ -425,8 +425,6 @@ exports.tx = { COINBASE_MATURITY: 100 }; -exports.tx.DUST_THRESHOLD = 182 * exports.tx.MIN_RELAY / 1000 * 3; - /** * Script-related constants. * @enum {Number} diff --git a/lib/protocol/networks.js b/lib/protocol/networks.js index 0c8fc3e4..530341b8 100644 --- a/lib/protocol/networks.js +++ b/lib/protocol/networks.js @@ -426,7 +426,7 @@ main.rpcPort = 8332; * @default */ -main.minRelay = 10000; +main.minRelay = 1000; /** * Default normal relay rate. @@ -635,7 +635,7 @@ testnet.requireStandard = false; testnet.rpcPort = 18332; -testnet.minRelay = 10000; +testnet.minRelay = 1000; testnet.feeRate = 20000; @@ -793,7 +793,7 @@ regtest.requireStandard = false; regtest.rpcPort = 18332; -regtest.minRelay = 10000; +regtest.minRelay = 1000; regtest.feeRate = 20000; @@ -918,7 +918,7 @@ segnet3.requireStandard = false; segnet3.rpcPort = 28332; -segnet3.minRelay = 10000; +segnet3.minRelay = 1000; segnet3.feeRate = 20000; @@ -1067,7 +1067,7 @@ segnet4.requireStandard = false; segnet4.rpcPort = 28902; -segnet4.minRelay = 10000; +segnet4.minRelay = 1000; segnet4.feeRate = 20000; @@ -1226,7 +1226,7 @@ simnet.requireStandard = false; simnet.rpcPort = 18556; -simnet.minRelay = 10000; +simnet.minRelay = 1000; simnet.feeRate = 20000; diff --git a/test/wallet-test.js b/test/wallet-test.js index 610dbe7b..c014b525 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -503,8 +503,12 @@ describe('Wallet', function() { assert(t2.verify()); 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 t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000); @@ -840,8 +844,12 @@ describe('Wallet', function() { assert(t2.verify()); 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 t3 = bcoin.mtx().addOutput(w2.getAddress(), 15000);