minor cleanup.

This commit is contained in:
Christopher Jeffrey 2015-12-15 01:23:49 -08:00
parent c68ab4ee7d
commit 1b07d6e906

View File

@ -127,7 +127,7 @@ TX.prototype.signature = function(input, key, type) {
type = 'all';
if (typeof type === 'string')
type = bcoin.protocol.constants.hashType[type];
type = constants.hashType[type];
// Get the previous output's subscript
var s = input.out.tx.getSubscript(input.out.index);
@ -203,7 +203,7 @@ TX.prototype.signInput = function(input, key, type) {
type = 'all';
if (typeof type === 'string')
type = bcoin.protocol.constants.hashType[type];
type = constants.hashType[type];
// Get the previous output's subscript
var s = input.out.tx.getSubscript(input.out.index);
@ -412,7 +412,7 @@ TX.prototype.subscriptHash = function subscriptHash(index, s, type) {
var copy = this.clone();
if (typeof type === 'string')
type = bcoin.protocol.constants.hashType[type];
type = constants.hashType[type];
copy.inputs.forEach(function(input, i) {
input.script = index === i ? s : [];