From 0bcc27b9b20d1ff3cbe0274f581e1fcba85fade6 Mon Sep 17 00:00:00 2001 From: Ethan Reesor Date: Fri, 13 Dec 2024 16:36:09 -0600 Subject: [PATCH] Remove unnecessary function --- internal/core/healing/synthetic.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/internal/core/healing/synthetic.go b/internal/core/healing/synthetic.go index ca5c048ef..d378c8a15 100644 --- a/internal/core/healing/synthetic.go +++ b/internal/core/healing/synthetic.go @@ -413,30 +413,6 @@ func loadAnchorFromChain[V any](batch *light.DB, chain *database.Chain2, block u return body, nil } -func (h *Healer) resolveSyntheticHash(args HealSyntheticArgs, si SequencedInfo) ([32]byte, error) { - // TODO: Is this actually useful? Can we replace ResolveSynthetic with this? - - batch := args.Light.OpenDB(false) - defer batch.Discard() - uSrc := protocol.PartitionUrl(si.Source) - uSynth := uSrc.JoinPath(protocol.Synthetic) - - // Load the synthetic sequence chain entry - seqEntry := new(protocol.IndexEntry) - err := batch.Account(uSynth).SyntheticSequenceChain(si.Destination).EntryAs(int64(si.Number)-1, seqEntry) - if err != nil { - return [32]byte{}, err - } - - // Get the hash of the message - hash, err := batch.Account(uSynth).MainChain().Entry(int64(seqEntry.Source)) - if err != nil { - return [32]byte{}, err - } - - return [32]byte(hash), nil -} - func (h *Healer) buildSynthReceiptV2(_ context.Context, args HealSyntheticArgs, si SequencedInfo) (*merkle.Receipt, error) { batch := args.Light.OpenDB(false) defer batch.Discard()