refactor: minor.
This commit is contained in:
parent
94720ce814
commit
ef44dcd6cb
4
bin/cli
4
bin/cli
@ -459,13 +459,13 @@ CLI.prototype.handleWallet = co(function* handleWallet() {
|
||||
this.log(' $ send [address] [value]: Send transaction.');
|
||||
this.log(' $ mktx [address] [value]: Create transaction.');
|
||||
this.log(' $ sign [tx-hex]: Sign transaction.');
|
||||
this.log(' $ zap --age [age]: Zap pending wallet TXs.');
|
||||
this.log(' $ zap [age?]: Zap pending wallet TXs.');
|
||||
this.log(' $ tx [hash]: View transaction details.');
|
||||
this.log(' $ view [tx-hex]: Parse and view transaction.');
|
||||
this.log(' $ import [wif|hex]: Import private or public key.');
|
||||
this.log(' $ watch [address]: Import an address.');
|
||||
this.log(' $ lock: Lock wallet.');
|
||||
this.log(' $ unlock [passphrase] [timeout]: Unlock wallet.');
|
||||
this.log(' $ unlock [passphrase] [timeout?]: Unlock wallet.');
|
||||
this.log('Other Options:');
|
||||
this.log(' --passphrase [passphrase]: For signing and account creation.');
|
||||
this.log(' --account [account-name]: Account name.');
|
||||
|
||||
@ -1216,19 +1216,11 @@ Mempool.prototype.storeOrphan = function storeOrphan(tx) {
|
||||
this.rejects.add(tx.hash());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
hash = tx.hash('hex');
|
||||
|
||||
for (i = 0; i < tx.inputs.length; i++) {
|
||||
input = tx.inputs[i];
|
||||
|
||||
if (input.coin)
|
||||
continue;
|
||||
|
||||
missing[input.prevout.hash] = true;
|
||||
}
|
||||
|
||||
hash = tx.hash('hex');
|
||||
missing = Object.keys(missing);
|
||||
|
||||
assert(missing.length > 0);
|
||||
|
||||
@ -1627,10 +1627,10 @@ TXDB.prototype.getCoins = function getCoins(account) {
|
||||
var hash = parts[0];
|
||||
var index = parts[1];
|
||||
var coin = Coin.fromRaw(value);
|
||||
var ckey = hash + index;
|
||||
coin.hash = hash;
|
||||
coin.index = index;
|
||||
key = hash + index;
|
||||
self.coinCache.set(key, value);
|
||||
self.coinCache.set(ckey, value);
|
||||
return coin;
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user