Skip to content

arda-org/repro_chain-simulator_slow-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An intra-shard dummy transaction that does nothing takes 4 blocks to get marked as successful:

import { expect, test } from "vitest";
import { FSWorld } from "xsuite";

test("Test", async () => {
  using world = await FSWorld.start({ gasPrice: 0 });
  const wallet = await world.createWallet();

  const nonceBefore = (await world.getNetworkStatus(0)).nonce;

  const txHash = await wallet.sendTx({
    receiver: wallet,
    gasLimit: 50_000,
  });

  for (let i = 1; i <= 4; i++) {
    await world.generateBlocks(1);
    expect((await world.getNetworkStatus(0)).nonce).toEqual(nonceBefore + i);
    expect(await world.proxy.getTxProcessStatus(txHash)).toEqual(i < 4 ? "pending" : "success");
  }
});

To run the test:

npm run test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published