From 4ace38d36eaa604ae7db68f7057916f2335524b3 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 14 Jun 2024 14:27:28 +1000 Subject: [PATCH] fix: events: use correct context for CollectEvents transaction --- chain/events/filter/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/events/filter/index.go b/chain/events/filter/index.go index dee4e5bf7e1..9085eb81c34 100644 --- a/chain/events/filter/index.go +++ b/chain/events/filter/index.go @@ -522,7 +522,7 @@ func (ei *EventIndex) Close() error { } func (ei *EventIndex) CollectEvents(ctx context.Context, te *TipSetEvents, revert bool, resolver func(ctx context.Context, emitter abi.ActorID, ts *types.TipSet) (address.Address, bool)) error { - tx, err := ei.db.Begin() + tx, err := ei.db.BeginTx(ctx, nil) if err != nil { return xerrors.Errorf("begin transaction: %w", err) }