Skip to content

Commit

Permalink
Add some logs so we can tell what it's doing
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantumplation committed Dec 3, 2024
1 parent d4c8339 commit 2ec2563
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions referee/referee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ const HYDRA_NODE = "http://localhost:4001/";
const RECORD_STATS = true;

const kinesis = new KinesisClient({
region:
process.env.AWS_REGION === "ap-southeast-1"
? "ap-southeast-1"
: "us-east-1",
region: "us-east-1",
});
const encoder = new TextEncoder();

Expand Down Expand Up @@ -330,9 +327,9 @@ try {
}

// Wait until the game starts
while (!gameId) {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
// while (!gameId) {
// await new Promise((resolve) => setTimeout(resolve, 1000));
// }

const args = [
"-server",
Expand Down Expand Up @@ -360,12 +357,18 @@ const args = [
// console.error(e);
// }

let counter = 0;
console.log("Submitting as many txs as possible");
while (true) {
if (!hydra.hydra.isConnected()) {
continue;
}
// According to https://www.doomworld.com/forum/topic/99810-how-much-data-does-online-dming-consume/ assumptions, the network packet is about 6 bytes
await hydra.SendPacket(0, 0, new Uint8Array([0, 0, 0, 0, 0, 0]));
counter++;
if (counter % 10000 === 0) {
console.log("10k transactions...");
}
await new Promise((resolve) => setTimeout(resolve, 1));
}

Expand Down

0 comments on commit 2ec2563

Please sign in to comment.