From f8974b383ab8e74160b2b5618a01eb80fbb21a33 Mon Sep 17 00:00:00 2001 From: Esteban Ordano Date: Tue, 10 Feb 2015 10:11:09 -0300 Subject: [PATCH] transaction: Change variable name from time to height --- lib/transaction/transaction.js | 12 ++++++------ test/transaction/transaction.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/transaction/transaction.js b/lib/transaction/transaction.js index ef28e0a..09e7250 100644 --- a/lib/transaction/transaction.js +++ b/lib/transaction/transaction.js @@ -308,18 +308,18 @@ Transaction.prototype.lockUntilDate = function(time) { * Sets nLockTime so that transaction is not valid until the desired block * height. * - * @param {Number} time + * @param {Number} height * @return {Transaction} this */ -Transaction.prototype.lockUntilBlockHeight = function(time) { - $.checkArgument(_.isNumber(time)); - if (time >= Transaction.NLOCKTIME_BLOCKHEIGHT_LIMIT) { +Transaction.prototype.lockUntilBlockHeight = function(height) { + $.checkArgument(_.isNumber(height)); + if (height >= Transaction.NLOCKTIME_BLOCKHEIGHT_LIMIT) { throw new errors.Transaction.BlockHeightTooHigh(); } - if (time < 0) { + if (height < 0) { throw new errors.Transaction.NLockTimeOutOfRange(); } - this.nLockTime = time; + this.nLockTime = height; return this; }; diff --git a/test/transaction/transaction.js b/test/transaction/transaction.js index 56bbee1..db0e81f 100644 --- a/test/transaction/transaction.js +++ b/test/transaction/transaction.js @@ -408,7 +408,7 @@ describe('Transaction', function() { }); }); - describe.only('setting the nLockTime', function() { + describe('setting the nLockTime', function() { var MILLIS_IN_SECOND = 1000; var timestamp = 1423504946; var blockHeight = 342734;