rpc: minor.
This commit is contained in:
parent
0873f7abe8
commit
9c8d4d185f
@ -2516,14 +2516,13 @@ RPC.prototype.resendwallettransactions = function resendwallettransactions(args,
|
||||
if (args.help || args.length !== 0)
|
||||
return callback(new RPCError('resendwallettransactions'));
|
||||
|
||||
this.wallet.getUnconfirmed(function(err, txs) {
|
||||
this.wallet.resend(function(err, txs) {
|
||||
if (err)
|
||||
return callback(err);
|
||||
|
||||
for (i = 0; i < txs.length; i++) {
|
||||
tx = txs[i];
|
||||
hashes.push(tx.rhash);
|
||||
self.pool.broadcast(tx);
|
||||
}
|
||||
|
||||
callback(null, hashes);
|
||||
@ -2555,7 +2554,7 @@ RPC.prototype.backupwallet = function backupwallet(args, callback) {
|
||||
|
||||
RPC.prototype.dumpprivkey = function dumpprivkey(args, callback) {
|
||||
var self = this;
|
||||
var hash, key;
|
||||
var hash;
|
||||
|
||||
if (args.help || args.length !== 1)
|
||||
return callback(new RPCError('dumpprivkey "bitcoinaddress"'));
|
||||
@ -2572,9 +2571,7 @@ RPC.prototype.dumpprivkey = function dumpprivkey(args, callback) {
|
||||
if (!ring)
|
||||
return callback(new RPCError('Key not found.'));
|
||||
|
||||
key = self.wallet.master.key;
|
||||
|
||||
if (!key)
|
||||
if (!self.wallet.master.key)
|
||||
return callback(new RPCError('Wallet is locked.'));
|
||||
|
||||
callback(null, ring.toSecret());
|
||||
@ -2583,7 +2580,7 @@ RPC.prototype.dumpprivkey = function dumpprivkey(args, callback) {
|
||||
|
||||
RPC.prototype.dumpwallet = function dumpwallet(args, callback) {
|
||||
var self = this;
|
||||
var file, time, key, address, fmt, str, out;
|
||||
var file, time, address, fmt, str, out;
|
||||
|
||||
if (args.help || args.length !== 1)
|
||||
return callback(new RPCError('dumpwallet "filename"'));
|
||||
@ -2615,9 +2612,7 @@ RPC.prototype.dumpwallet = function dumpwallet(args, callback) {
|
||||
if (!ring)
|
||||
return next();
|
||||
|
||||
key = self.wallet.master.key;
|
||||
|
||||
if (!key)
|
||||
if (!self.wallet.master.key)
|
||||
return callback(new RPCError('Wallet is locked.'));
|
||||
|
||||
address = ring.getAddress('base58');
|
||||
@ -3891,7 +3886,7 @@ RPC.prototype.settxfee = function settxfee(args, callback) {
|
||||
|
||||
RPC.prototype.signmessage = function signmessage(args, callback) {
|
||||
var self = this;
|
||||
var address, msg, key, sig;
|
||||
var address, msg, sig;
|
||||
|
||||
if (args.help || args.length !== 2)
|
||||
return callback(new RPCError('signmessage "bitcoinaddress" "message"'));
|
||||
@ -3911,9 +3906,7 @@ RPC.prototype.signmessage = function signmessage(args, callback) {
|
||||
if (!ring)
|
||||
return callback(new RPCError('Address not found.'));
|
||||
|
||||
key = self.wallet.master.key;
|
||||
|
||||
if (!key)
|
||||
if (!self.wallet.master.key)
|
||||
return callback(new RPCError('Wallet is locked.'));
|
||||
|
||||
msg = new Buffer(RPC.magic + msg, 'utf8');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user