Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indexers: only include positions that were found #190

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions blockchain/indexers/flatutreexoproofindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,10 @@ func (idx *FlatUtreexoProofIndex) GenerateUDataPartial(dels []wire.LeafData, pos

targets := make([]uint64, len(delHashes))
for i, delHash := range delHashes {
pos, _ := idx.utreexoState.state.GetLeafPosition(delHash)
targets[i] = pos
pos, found := idx.utreexoState.state.GetLeafPosition(delHash)
if found {
targets[i] = pos
}
}

ud.AccProof = utreexo.Proof{
Expand Down
6 changes: 4 additions & 2 deletions blockchain/indexers/utreexoproofindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,10 @@ func (idx *UtreexoProofIndex) GenerateUDataPartial(dels []wire.LeafData, positio

targets := make([]uint64, len(delHashes))
for i, delHash := range delHashes {
pos, _ := idx.utreexoState.state.GetLeafPosition(delHash)
targets[i] = pos
pos, found := idx.utreexoState.state.GetLeafPosition(delHash)
if found {
targets[i] = pos
}
}
ud.AccProof = utreexo.Proof{
Targets: targets,
Expand Down
Loading