Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test: delete many expired batches #65

Open
significance opened this issue Nov 24, 2022 · 2 comments
Open

add test: delete many expired batches #65

significance opened this issue Nov 24, 2022 · 2 comments
Assignees
Labels

Comments

@significance
Copy link
Member


      // todo add this and perhaps other, longer tests
      // it('should delete many expired batches', async function () {
      //   const price = 2048;
      //   await setPrice(price);

      //   transferAmount = 2000 * batch.initialPaymentPerChunk * batchSize;
      //   expectedNormalisedBalance = batch.initialPaymentPerChunk;

      //   await token.mint(stamper, transferAmount);
      //   (await ethers.getContract('TestToken', stamper)).approve(postageStamp.address, transferAmount);

      //   for (let i = 0; i < 20; i++) {
      //     const nonce =
      //       '0x000000000000000000000000000000000000000000000000000000000000' + i.toString().padStart(4, '0');
      //     await postageStamp.createBatch(
      //       stamper,
      //       10240 - i,
      //       batch.depth,
      //       batch.bucketDepth,
      //       nonce,
      //       batch.immutable
      //     );
      //   }

      //   await mineNBlocks(5);

      //   const nonce3 = '0x0000000000000000000000000000000000000000000000000000000000011237';
      //   await postageStamp.createBatch(
      //     stamper,
      //     4096,
      //     batch.depth,
      //     batch.bucketDepth,
      //     nonce3,
      //     batch.immutable
      //   );

      //   expect(await postageStamp.pot()).equal(210 * 2 ** batch.depth);
      // });
@bee-runner bee-runner bot added the issue label Nov 24, 2022
@agazso
Copy link
Member

agazso commented Dec 21, 2022

What is this test meant to test? There are a lot of implied logic going on, because the name states that it is about deleting expired batches but the matcher at the end tests for a certain amount of pot.

@significance
Copy link
Member Author

What is this test meant to test? There are a lot of implied logic going on, because the name states that it is about deleting expired batches but the matcher at the end tests for a certain amount of pot.

yes, it was from the initial battery of tests that i replaced. i think all of the implied logic should be tested. this may already be the case, but let's check.

@significance significance changed the title add this test add test: delete many expired batches Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants