From 4c713362ecd240ee2b9a029eacb0e9316b767c81 Mon Sep 17 00:00:00 2001 From: Ethan Reesor Date: Wed, 1 May 2024 23:13:23 -0500 Subject: [PATCH] Oops --- internal/database/snapshot.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/database/snapshot.go b/internal/database/snapshot.go index bcef52418..3f4f103e7 100644 --- a/internal/database/snapshot.go +++ b/internal/database/snapshot.go @@ -566,11 +566,6 @@ func collectMessageHashes(a *Account, hashes *indexing.Bucket, opts *CollectOpti } func collectMessageHash(a *Account, c *Chain2, hashes *indexing.Bucket, opts *CollectOptions, h [32]byte) error { - err := hashes.Write(h, nil) - if err != nil { - return errors.UnknownError.WithFormat("record %s chain entry: %w", c.Name(), err) - } - msg, err := a.parent.newMessage(messageKey{h}).Main().Get() if err != nil { slog.Error("Failed to collect message", "account", a.Url(), "hash", logging.AsHex(h), "error", err) @@ -587,6 +582,11 @@ func collectMessageHash(a *Account, c *Chain2, hashes *indexing.Bucket, opts *Co } } + err = hashes.Write(h, nil) + if err != nil { + return errors.UnknownError.WithFormat("record %s chain entry: %w", c.Name(), err) + } + forTxn, ok := msg.(messaging.MessageForTransaction) if !ok { return nil