Skip to content

Commit

Permalink
universe: transfer universe tracks number of proofs as MS-SMT sum
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Oct 11, 2023
1 parent 305962c commit 3080658
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion universe/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@ func (m *Leaf) SmtLeafNode() (*mssmt.LeafNode, error) {
return nil, err
}

return mssmt.NewLeafNode(buf.Bytes(), m.Amt), nil
amount := m.Amt
if !m.Proof.Asset.IsGenesisAsset() {
// We set transfer proof amounts to 1 as the transfer universe
// tracks the total number of transfers.
amount = 1
}

return mssmt.NewLeafNode(buf.Bytes(), amount), nil
}

// LeafKey is the top level leaf key for a universe. This will be used to key
Expand Down

0 comments on commit 3080658

Please sign in to comment.