Merge pull request #596 from isocolsky/ref/fee-levels

Redefine priority & normal fee levels
This commit is contained in:
Matias Alejo Garcia 2016-11-04 11:42:37 -03:00 committed by GitHub
commit 3fb33218a7
2 changed files with 28 additions and 5 deletions

View File

@ -26,11 +26,11 @@ Defaults.SCAN_ADDRESS_GAP = Defaults.MAX_MAIN_ADDRESS_GAP + 20;
Defaults.FEE_LEVELS = [{
name: 'priority',
nbBlocks: 1,
nbBlocks: 2,
defaultValue: 50000
}, {
name: 'normal',
nbBlocks: 2,
nbBlocks: 3,
defaultValue: 40000
}, {
name: 'economy',
@ -85,7 +85,7 @@ Defaults.BLOCKHEIGHT_CACHE_TIME = 10 * 60;
// Max allowed timespan for notification queries in seconds
Defaults.MAX_NOTIFICATIONS_TIMESPAN = 60 * 60 * 24 * 14 ; // ~ 2 weeks
Defaults.NOTIFICATIONS_TIMESPAN = 60;
Defaults.MAX_NOTIFICATIONS_TIMESPAN = 60 * 60 * 24 * 14; // ~ 2 weeks
Defaults.NOTIFICATIONS_TIMESPAN = 60;
module.exports = Defaults;

View File

@ -2043,7 +2043,30 @@ describe('Wallet service', function() {
});
describe('#getFeeLevels', function() {
var server, wallet;
var server, wallet, levels;
before(function() {
levels = Defaults.FEE_LEVELS;
Defaults.FEE_LEVELS = [{
name: 'priority',
nbBlocks: 1,
defaultValue: 50000
}, {
name: 'normal',
nbBlocks: 2,
defaultValue: 40000
}, {
name: 'economy',
nbBlocks: 6,
defaultValue: 25000
}, {
name: 'superEconomy',
nbBlocks: 24,
defaultValue: 10000
}];
});
after(function() {
Defaults.FEE_LEVELS = levels;
});
beforeEach(function(done) {
helpers.createAndJoinWallet(1, 1, function(s, w) {
server = s;