[FEATURE] allow per transaction fees to be set

This commit is contained in:
Bo Chen
2014-12-09 14:11:19 -08:00
parent 0835de983b
commit 9b22f279bc
3 changed files with 40 additions and 2 deletions

View File

@@ -828,6 +828,23 @@ describe('Transaction', function() {
assert.strictEqual(transaction._setMaxFee, true);
});
it('Set Fixed Fee', function() {
var transaction = new Transaction();
transaction.setFixedFee('a');
assert(!transaction._setFixedFee);
transaction.setFixedFee(-1000);
assert(!transaction._setFixedFee);
transaction.setFixedFee(NaN);
assert(!transaction._setFixedFee);
transaction.setFixedFee(1000);
assert.strictEqual(transaction._setFixedFee, true);
assert.strictEqual(transaction.tx_json.Fee, '1000');
});
it('Rewrite transaction path', function() {
var transaction = new Transaction();