diff --git a/lib/node/fullnode.js b/lib/node/fullnode.js index e1a60e59..80da1269 100644 --- a/lib/node/fullnode.js +++ b/lib/node/fullnode.js @@ -320,7 +320,8 @@ Fullnode.prototype.sendTX = co(function* sendTX(tx) { this._error(err); this.logger.warning('Verification failed for tx: %s.', tx.rhash); this.logger.warning('Attempting to broadcast anyway...'); - return this.pool.broadcast(tx); + yield this.pool.broadcast(tx); + return; } throw err; } @@ -328,7 +329,7 @@ Fullnode.prototype.sendTX = co(function* sendTX(tx) { if (!this.options.selfish) tx = tx.toInv(); - return this.pool.broadcast(tx); + yield this.pool.broadcast(tx); }); /** diff --git a/lib/script/stack.js b/lib/script/stack.js index 17a2c12e..a7b56b7d 100644 --- a/lib/script/stack.js +++ b/lib/script/stack.js @@ -280,7 +280,7 @@ Stack.prototype.swap = function swap(i1, i2) { */ Stack.isStack = function isStack(obj) { - return obj && Array.isArray(obj.items) && typeof obj.swap2 === 'function'; + return obj && Array.isArray(obj.items) && typeof obj.swap === 'function'; }; /* diff --git a/lib/wallet/wallet.js b/lib/wallet/wallet.js index bbaa98fd..f49a0fa4 100644 --- a/lib/wallet/wallet.js +++ b/lib/wallet/wallet.js @@ -712,7 +712,7 @@ Wallet.prototype.createNested = function createNested(account) { /** * Create a new address (increments depth). * @param {(Number|String)?} account - * @param {Boolean} change + * @param {Number} branch * @returns {Promise} - Returns {@link WalletKey}. */ @@ -727,8 +727,9 @@ Wallet.prototype.createKey = co(function* createKey(account, branch) { /** * Create a new address (increments depth) without a lock. + * @private * @param {(Number|String)?} account - * @param {Boolean} change + * @param {Number} branche * @returns {Promise} - Returns {@link WalletKey}. */