Merge pull request #135 from Permissionless-Software-Foundation/ct-unstable

fix(debugging): Adding additional debugging info to SLP utils
This commit is contained in:
Chris Troutner
2021-03-26 12:53:35 -08:00
committed by GitHub
+8
View File
@@ -1098,6 +1098,7 @@ 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.')
@@ -1156,6 +1157,8 @@ class Utils {
} }
} }
console.log('Existing tokenUtxoDetails()')
return outAry return outAry
} catch (error) { } catch (error) {
console.log('Error in tokenUtxoDetails()') console.log('Error in tokenUtxoDetails()')
@@ -1283,6 +1286,7 @@ 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 = {}
@@ -1502,6 +1506,7 @@ class Utils {
} }
} }
console.log('Exiting _hydrateUtxo()')
return outAry return outAry
} catch (error) { } catch (error) {
console.log('Error in _hydrateUtxo()') console.log('Error in _hydrateUtxo()')
@@ -1547,6 +1552,7 @@ 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)
@@ -1636,6 +1642,8 @@ 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