fix: Check ledger range in every handler (#1755)

fixes #1565
This commit is contained in:
Peter Chen
2024-11-29 10:11:07 -05:00
committed by GitHub
parent f62fadc9f9
commit fe4f95dabd
47 changed files with 377 additions and 25 deletions

View File

@@ -77,11 +77,14 @@ private:
struct SyncAsioContextTest : virtual public NoLoggerFixture {
template <typename F>
void
runSpawn(F&& f)
runSpawn(F&& f, bool allowMockLeak = false)
{
using namespace boost::asio;
testing::MockFunction<void()> call;
if (allowMockLeak)
testing::Mock::AllowLeak(&call);
spawn(ctx, [&, _ = make_work_guard(ctx)](yield_context yield) {
f(yield);
call.Call();