Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed May 2, 2024
1 parent 7dfcbf4 commit 4c71336
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/database/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 4c71336

Please sign in to comment.