osmosis-labs / test-tube

Test tube for cosmos-sdk chains integration test, written in Rust!
Apache License 2.0
54 stars 33 forks source link

Run msgs in the same block #19

Open iboss-ptk opened 1 year ago

iboss-ptk commented 1 year ago

Why do we need this

Allowing test to be able to test scenario that requires multiple txs in the same block.

What should it look like

Implement Runner trait for Block which all it's functionality are scoped to specific block of a specific app.

pub struct Block(BaseApp);

impl<'a> Runner<'a> for Block { ... }

BaseApp should implement the following function.

pub fn run_block(impl Fn(Block));

Now that we can move BaseApp Runner logic to Block and new BaseApp implementation can call them through run_block.

Implement this function in OsmosisTestApp