fix(debugging): Removing all the debugging statements

This commit is contained in:
Chris Troutner
2021-03-26 18:57:08 -07:00
parent fbac18d456
commit 2d2a91dfde
+11 -29
View File
@@ -932,7 +932,6 @@ class Utils {
*/ */
// Reimplementation of decodeOpReturn() using slp-parser. // Reimplementation of decodeOpReturn() using slp-parser.
async decodeOpReturn (txid, cache = null, usrObj = null) { async decodeOpReturn (txid, cache = null, usrObj = null) {
console.log(`Entering decodeOpReturn with txid ${txid}.`)
// The cache object is an in-memory cache (JS Object) that can be passed // The cache object is an in-memory cache (JS Object) that can be passed
// into this function. It helps if multiple vouts from the same TXID are // into this function. It helps if multiple vouts from the same TXID are
// being evaluated. In that case, it can significantly reduce the number // being evaluated. In that case, it can significantly reduce the number
@@ -957,8 +956,6 @@ class Utils {
throw new Error('txid string must be included.') throw new Error('txid string must be included.')
} }
console.log(`axiosOptions: ${JSON.stringify(_this.axiosOptions, null, 2)}`)
// CT: 2/24/21 Deprected GET in favor of POST, to pass IP address. // CT: 2/24/21 Deprected GET in favor of POST, to pass IP address.
// Retrieve the transaction object from the full node. // Retrieve the transaction object from the full node.
const path = `${this.restURL}rawtransactions/getRawTransaction` const path = `${this.restURL}rawtransactions/getRawTransaction`
@@ -1016,20 +1013,18 @@ class Utils {
if (cache) cache[txid] = tokenData if (cache) cache[txid] = tokenData
console.log('Exiting decodeOpReturn()')
return tokenData return tokenData
} catch (error) { } catch (error) {
// Used for debugging // Used for debugging
console.log('decodeOpReturn error: ', error) // console.log('decodeOpReturn error: ', error)
console.log(`decodeOpReturn error.message: ${error.message}`) // console.log(`decodeOpReturn error.message: ${error.message}`)
if (error.response && error.response.data) { // if (error.response && error.response.data) {
console.log( // console.log(
`decodeOpReturn error.response.data: ${JSON.stringify( // `decodeOpReturn error.response.data: ${JSON.stringify(
error.response.data // error.response.data
)}` // )}`
) // )
} // }
throw error throw error
} }
} }
@@ -1103,7 +1098,6 @@ class Utils {
* } * }
*/ */
async tokenUtxoDetails (utxos, usrObj = null) { async tokenUtxoDetails (utxos, usrObj = null) {
console.log('Entering tokenUtxoDetails()')
try { try {
// Throw error if input is not an array. // Throw error if input is not an array.
if (!Array.isArray(utxos)) throw new Error('Input must be an array.') if (!Array.isArray(utxos)) throw new Error('Input must be an array.')
@@ -1162,11 +1156,9 @@ class Utils {
} }
} }
console.log('Exiting tokenUtxoDetails()')
return outAry return outAry
} catch (error) { } catch (error) {
console.log('Error in tokenUtxoDetails()') // console.log('Error in tokenUtxoDetails()')
if (error.response && error.response.data) throw error.response.data if (error.response && error.response.data) throw error.response.data
throw error throw error
} }
@@ -1291,7 +1283,6 @@ class Utils {
// If the usrObj has a utxoDelay property, then it will delay the loop for // If the usrObj has a utxoDelay property, then it will delay the loop for
// each UTXO by that many milliseconds. // each UTXO by that many milliseconds.
async _hydrateUtxo (utxos, usrObj = null) { async _hydrateUtxo (utxos, usrObj = null) {
console.log('Entering _hydrateUtxo()')
try { try {
const decodeOpReturnCache = {} const decodeOpReturnCache = {}
@@ -1511,10 +1502,8 @@ class Utils {
} }
} }
console.log('Exiting _hydrateUtxo()')
return outAry return outAry
} catch (error) { } catch (error) {
console.log('Error in _hydrateUtxo()')
// console.log('_hydrateUtxo error: ', error) // console.log('_hydrateUtxo error: ', error)
throw error throw error
} }
@@ -1557,7 +1546,6 @@ class Utils {
* true * true
*/ */
async waterfallValidateTxid (txid, usrObj = null) { async waterfallValidateTxid (txid, usrObj = null) {
console.log('Entering waterfallValidateTxid()')
try { try {
// console.log('txid: ', txid) // console.log('txid: ', txid)
@@ -1647,13 +1635,11 @@ class Utils {
return isValid return isValid
} }
console.log('Exiting waterfallValidateTxid()')
// If isValid is still null, return that value, signaling that the txid // If isValid is still null, return that value, signaling that the txid
// could not be validated. // could not be validated.
return isValid return isValid
} catch (error) { } catch (error) {
console.log('Error in waterfallValidateTxid()') // console.log('Error in waterfallValidateTxid()')
if (error.response && error.response.data) throw error.response.data if (error.response && error.response.data) throw error.response.data
throw error throw error
} }
@@ -1844,10 +1830,6 @@ class Utils {
// Throw error if input is not an array. // Throw error if input is not an array.
if (!Array.isArray(utxos)) throw new Error('Input must be an array.') if (!Array.isArray(utxos)) throw new Error('Input must be an array.')
console.log(
`axiosOptions: ${JSON.stringify(_this.axiosOptions, null, 2)}`
)
const response = await _this.axios.post( const response = await _this.axios.post(
`${this.restURL}slp/hydrateUtxos`, `${this.restURL}slp/hydrateUtxos`,
{ {