Skip to content

Commit

Permalink
Remove unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Dec 13, 2024
1 parent a89c84c commit 0bcc27b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions internal/core/healing/synthetic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0bcc27b

Please sign in to comment.