remove console.logs

This commit is contained in:
Manuel Araoz 2014-04-03 15:52:31 -03:00
parent 30ba137914
commit 1d368679cb
1 changed files with 0 additions and 17 deletions

View File

@ -298,11 +298,8 @@ var TransactionSignatureSerializer = function(txTo, scriptCode, nIn, nHashType)
this.txTo = txTo; this.txTo = txTo;
this.scriptCode = scriptCode; this.scriptCode = scriptCode;
this.nIn = nIn; this.nIn = nIn;
console.log('nHashType '+nHashType);
this.anyoneCanPay = !!(nHashType & SIGHASH_ANYONECANPAY); this.anyoneCanPay = !!(nHashType & SIGHASH_ANYONECANPAY);
console.log('anyoneCanPay ='+this.anyoneCanPay);
var hashTypeMode = nHashType & 0x1f; var hashTypeMode = nHashType & 0x1f;
console.log('hashTypeMode ='+hashTypeMode);
this.hashSingle = hashTypeMode === SIGHASH_SINGLE; this.hashSingle = hashTypeMode === SIGHASH_SINGLE;
this.hashNone = hashTypeMode === SIGHASH_NONE; this.hashNone = hashTypeMode === SIGHASH_NONE;
this.bytes = new Put(); this.bytes = new Put();
@ -322,18 +319,13 @@ TransactionSignatureSerializer.prototype.serializeOutput = function(nOutput) {
this.bytes.varint(out.s.length); this.bytes.varint(out.s.length);
this.bytes.put(out.s); this.bytes.put(out.s);
} }
console.log('after output '+nOutput+': '+buffertools.toHex(this.bytes.buffer()));
}; };
// serialize the script // serialize the script
TransactionSignatureSerializer.prototype.serializeScriptCode = function() { TransactionSignatureSerializer.prototype.serializeScriptCode = function() {
console.log('scriptCode='+this.scriptCode);
this.scriptCode.findAndDelete(OP_CODESEPARATOR); this.scriptCode.findAndDelete(OP_CODESEPARATOR);
console.log('scriptCode='+this.scriptCode);
this.bytes.varint(this.scriptCode.buffer.length); this.bytes.varint(this.scriptCode.buffer.length);
console.log('after varint: '+buffertools.toHex(this.bytes.buffer()));
this.bytes.put(this.scriptCode.buffer); this.bytes.put(this.scriptCode.buffer);
console.log('after script: '+buffertools.toHex(this.bytes.buffer()));
}; };
// serialize an input of txTo // serialize an input of txTo
@ -343,7 +335,6 @@ TransactionSignatureSerializer.prototype.serializeInput = function(nInput) {
// Serialize the prevout // Serialize the prevout
this.bytes.put(this.txTo.ins[nInput].o); this.bytes.put(this.txTo.ins[nInput].o);
console.log('after prevout: '+buffertools.toHex(this.bytes.buffer()));
// Serialize the script // Serialize the script
if (nInput !== this.nIn) { if (nInput !== this.nIn) {
@ -359,7 +350,6 @@ TransactionSignatureSerializer.prototype.serializeInput = function(nInput) {
} else { } else {
this.bytes.word32le(this.txTo.ins[nInput].q); this.bytes.word32le(this.txTo.ins[nInput].q);
} }
console.log('after input '+nInput+': '+buffertools.toHex(this.bytes.buffer()));
}; };
@ -368,28 +358,21 @@ TransactionSignatureSerializer.prototype.serializeInput = function(nInput) {
TransactionSignatureSerializer.prototype.serialize = function() { TransactionSignatureSerializer.prototype.serialize = function() {
// serialize nVersion // serialize nVersion
this.bytes.word32le(this.txTo.version); this.bytes.word32le(this.txTo.version);
console.log(buffertools.toHex(this.bytes.buffer())+' after version');
// serialize vin // serialize vin
var nInputs = this.anyoneCanPay ? 1 : this.txTo.ins.length; var nInputs = this.anyoneCanPay ? 1 : this.txTo.ins.length;
this.bytes.varint(nInputs); this.bytes.varint(nInputs);
console.log(buffertools.toHex(this.bytes.buffer())+' after nInputs');
for (var nInput = 0; nInput < nInputs; nInput++) { for (var nInput = 0; nInput < nInputs; nInput++) {
this.serializeInput(nInput); this.serializeInput(nInput);
} }
console.log(buffertools.toHex(this.bytes.buffer())+' after inputs');
// serialize vout // serialize vout
var nOutputs = this.hashNone ? 0 : (this.hashSingle ? this.nIn + 1 : this.txTo.outs.length); var nOutputs = this.hashNone ? 0 : (this.hashSingle ? this.nIn + 1 : this.txTo.outs.length);
this.bytes.varint(nOutputs); this.bytes.varint(nOutputs);
console.log(buffertools.toHex(this.bytes.buffer())+' after nOutputs');
console.log('nOutputs = '+nOutputs);
for (var nOutput = 0; nOutput < nOutputs; nOutput++) { for (var nOutput = 0; nOutput < nOutputs; nOutput++) {
this.serializeOutput(nOutput); this.serializeOutput(nOutput);
} }
console.log(buffertools.toHex(this.bytes.buffer())+' after outputs');
// serialize nLockTime // serialize nLockTime
this.bytes.word32le(this.txTo.lock_time); this.bytes.word32le(this.txTo.lock_time);
console.log(buffertools.toHex(this.bytes.buffer())+' after lock_time');
}; };
TransactionSignatureSerializer.prototype.buffer = function() { TransactionSignatureSerializer.prototype.buffer = function() {