wallet: fix resend.

This commit is contained in:
Christopher Jeffrey 2017-01-19 02:06:42 -08:00
parent 9c352c5d2b
commit 6bc016f313
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1750,11 +1750,15 @@ Wallet.prototype.increaseFee = co(function* increaseFee(hash, rate, passphrase)
*/
Wallet.prototype.resend = co(function* resend() {
var txs = yield this.getPending();
var wtxs = yield this.getPending();
var txs = [];
var i;
if (txs.length > 0)
this.logger.info('Rebroadcasting %d transactions.', txs.length);
if (wtxs.length > 0)
this.logger.info('Rebroadcasting %d transactions.', wtxs.length);
for (i = 0; i < wtxs.length; i++)
txs.push(wtxs[i]);
txs = common.sortTX(txs);