rpc: minor.

This commit is contained in:
Christopher Jeffrey 2017-03-16 13:47:37 -07:00
parent 0a065be686
commit 35d9727bc3
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -835,8 +835,10 @@ RPC.prototype.getTXOutProof = co(function* getTXOutProof(args, help) {
for (i = 0; i < txids.length; i++) {
txid = txids[i];
if (!block.hasTX(txid))
throw new RPCError(errs.VERIFY_ERROR, 'Block does not contain all txids.');
if (!block.hasTX(txid)) {
throw new RPCError(errs.VERIFY_ERROR,
'Block does not contain all txids.');
}
}
block = MerkleBlock.fromHashes(block, txids);
@ -2539,7 +2541,8 @@ RPC.prototype.scriptToJSON = function scriptToJSON(script, hex) {
hex: undefined,
type: Script.typesByVal[type],
reqSigs: 1,
addresses: []
addresses: [],
p2sh: undefined
};
if (hex)