From ed553a8363084f0437dd099bbfb971d79f247727 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Wed, 29 Mar 2023 13:18:26 +0200 Subject: [PATCH] Fix bug in searchForIndexedMsg which always returns an error --- chain/stmgr/searchwait.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chain/stmgr/searchwait.go b/chain/stmgr/searchwait.go index 34ecc8fae..356ace23c 100644 --- a/chain/stmgr/searchwait.go +++ b/chain/stmgr/searchwait.go @@ -221,7 +221,10 @@ func (sm *StateManager) searchForIndexedMsg(ctx context.Context, mcid cid.Cid, m } r, foundMsg, err := sm.tipsetExecutedMessage(ctx, xts, mcid, m.VMMessage(), false) - return xts, r, foundMsg, xerrors.Errorf("error in tipstExecutedMessage: %w", err) + if err != nil { + return nil, nil, cid.Undef, xerrors.Errorf("error in tipstExecutedMessage: %w", err) + } + return xts, r, foundMsg, nil } // searchBackForMsg searches up to limit tipsets backwards from the given