Skip to content

Commit

Permalink
chore: blockTool tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jan 30, 2025
1 parent 98ea779 commit 100eae4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion multichain-testing/tools/e2e-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ const makeBlockTool = ({ rpc, delay }) => {

let last;
const waitForBlock = async (times = 1, info = {}) => {
trace('waitForBlock', times, info);
await null;
for (let time = 0; time < times; time += 1) {
trace('…', time);
for (;;) {
const cur = await waitForBootstrap(2000, { ...info, last });
trace(' cur', cur);

if (cur !== last) {
last = cur;
Expand Down Expand Up @@ -483,7 +486,7 @@ export const makeE2ETools = async (
if (typeof info === 'object' && Object.keys(info).length > 0) {
// XXX normally we have the caller pass in the log function
// later, but the way blockTool is factored, we have to supply it early.
trace({ ...info, delay: ms / 1000 }, '...');
trace('delay', { ...info, delay: ms / 1000 }, '...');
}
return delay(ms);
};
Expand Down

0 comments on commit 100eae4

Please sign in to comment.