Skip to content

RISC-V: inbox-bench confirms expected balances

Emma Turner requested to merge emturner@riscv-jstz-balance-check into master

Previous !13374 (merged)

What

Add sanity checks for balances, after all transfers are applied.

Why

To ensure the generated transfers truly did work as intended.

How

A small change was needed in the generation:

  • we use 'one more account' than strictly required
  • we send num_accounts - 1 in the first transfer from each account

This was required, as otherwise there was no way to tell between a transfer not done of a token at all, vs only one transfer done with a transfer.

Manually testing the MR

Try with a few values: src/riscv/scripts/jstz-bench.sh <num_transfers>

You'll see a new Balances are consistent message in the output.

Edited by Emma Turner

Merge request reports