Skip to content

Commit

Permalink
chore(client-utils): uncomment console.debug calls
Browse files Browse the repository at this point in the history
rel: #10574
  • Loading branch information
Jorge-Lopes committed Nov 26, 2024
1 parent 063d01e commit 7047385
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/client-utils/src/vstorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const makeVStorage = (powers, config) => {
/** @param {string} path */
const getJSON = path => {
const url = config.rpcAddrs[0] + path;
// console.warn('fetching', url);
console.warn('fetching', url);
return powers.fetch(url, { keepalive: true }).then(res => res.json());
};
// height=0 is the same as omitting height and implies the highest block
Expand Down Expand Up @@ -89,14 +89,14 @@ export const makeVStorage = (powers, config) => {
let blockHeight;
await null;
do {
// console.debug('READING', { blockHeight });
console.debug('READING', { blockHeight });
let values;
try {
({ blockHeight, values } = await vstorage.readAt(
path,
blockHeight && Number(blockHeight) - 1,
));
// console.debug('readAt returned', { blockHeight });
console.debug('readAt returned', { blockHeight });
} catch (err) {
if (
// CosmosSDK ErrInvalidRequest with particular message text;
Expand All @@ -107,14 +107,14 @@ export const makeVStorage = (powers, config) => {
err.code === 18 &&
err.message.match(/pruned/)
) {
// console.error(err);
console.error(err);
break;
}
throw err;
}
parts.push(values);
// console.debug('PUSHED', values);
// console.debug('NEW', { blockHeight, minHeight });
console.debug('PUSHED', values);
console.debug('NEW', { blockHeight, minHeight });
if (minHeight && Number(blockHeight) <= Number(minHeight)) break;
} while (blockHeight > 0);
return parts.flat();
Expand Down

0 comments on commit 7047385

Please sign in to comment.