Skip to content

Commit

Permalink
fix: update query path for getAnchor in Penumbra provider (#1443)
Browse files Browse the repository at this point in the history
* fix: update query path for getAnchor

* fix: update query path for getAnchor
  • Loading branch information
jtieri authored Apr 11, 2024
1 parent 970af77 commit f582fcd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions relayer/chains/penumbra/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ func (cc *PenumbraProvider) getAnchor(ctx context.Context) (*penumbracrypto.Merk
height = 0
}

path := fmt.Sprintf("sct/anchor/%d", height)
// TODO: this will need to be replaced with an RPC call to the SCT query service once it exists
path := fmt.Sprintf("sct/tree/anchor_by_height/%d", height)

req := abci.RequestQuery{
Path: "state/key",
Expand All @@ -275,7 +276,7 @@ func (cc *PenumbraProvider) getAnchor(ctx context.Context) (*penumbracrypto.Merk
}

if res.Value == nil {
return nil, errors.New("no anchor found for height" + strconv.FormatInt(height, 10))
return nil, errors.New("no anchor found for height " + strconv.FormatInt(height, 10))
}

return &penumbracrypto.MerkleRoot{Inner: res.Value[2:]}, nil
Expand Down

0 comments on commit f582fcd

Please sign in to comment.