Closed j4m1ef0rd closed 4 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71%. Comparing base (
a49451d
) to head (1855518
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
cool feature!
Very happy to get rid of the gas limit test's spaghetti code to handle that edge case, good stuff!
We could probably set up an indexer docker container and then you could run SQL queries against the blocks instead
We could probably set up an indexer docker container and then you could run SQL queries against the blocks instead
I like the idea, but what will happen when the protocol makes changes to the evens (or adds new ones?). Presumably we won't be able to run bouncer tests until the indexer is updated too? I'm not 100% sure how this works, but I think currently it is maintained by the product team? Of course one solution would be to make it the protocol's team responsibility to update it 🤷. Not sure, but maybe something to consider.
Pull Request
Closes: PRO-1550
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
@acdibble or someone from product, can you please check
substrate.ts
. @albert-llimos can you please check I didn't screw up your GasLimitCCM test.observeEvents
function that is able to find matches from past events and return a list.observeEvent
to use the newobserveEvents
function and just take the first match.observeEvents
to be able to look at past events. If nohistoricCheckBlocks
is provided, then the behaviour is the same as before.FoK
test and theGasLimitCCM
test to use the new functions.Out of scope:
Caching the historic events. EachobserveEvents
call will retrieve the events for each block from the api each time. Could be a problem if running the test on a real network or if we start to use this a lot in tests.Supporting reorgs on the event cache. Seems we are only using it on the StateChain for now.who cares about scopes anyways.