Skip to content

Commit

Permalink
Merge pull request #256 from kcalvinalvin/2025-02-06-fix-root-state-i…
Browse files Browse the repository at this point in the history
…nit-bug

indexers: don't add the current state
  • Loading branch information
kcalvinalvin authored Feb 6, 2025
2 parents c44d056 + 298f48d commit c3a245a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions blockchain/indexers/flatutreexoproofindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,7 @@ func (idx *FlatUtreexoProofIndex) initUtreexoRootsState() error {
}
}

bytes, err := blockchain.SerializeUtreexoRoots(
idx.utreexoState.state.GetNumLeaves(),
idx.utreexoState.state.GetRoots(),
)
if err != nil {
return err
}

rootHash := sha256.Sum256(bytes)
return idx.utreexoRootsState.Modify([]utreexo.Leaf{{Hash: rootHash}}, nil, utreexo.Proof{})
return nil
}

// Init initializes the flat utreexo proof index. This is part of the Indexer
Expand Down

0 comments on commit c3a245a

Please sign in to comment.