mit-dci / utreexo

accumulator for bitcoin utxo set
MIT License
323 stars 60 forks source link

accumulator/forestproofs: remove single-leaf `Prove{Many}`/`Verify{Many}` methods #356

Closed theStack closed 1 year ago

theStack commented 2 years ago

As suggested by @adiabat in https://github.com/mit-dci/utreexo/pull/352#issuecomment-1101462359:

We should probably get rid of the Prove function since really we're always going to use batch proofs, even if there's only one leaf.

Prove and Verify are only used in one unit test, so this one is adapted to use the batch proof equivalents ProveBatch and VerifyBatchProof instead. Note that this also makes the structure Proof obsolete, so this is removed as well.

kcalvinalvin commented 2 years ago

ACK 41978b67100a63881e0d68198a68a1bc0d9a849a

side-note: we should get rid of those commented out code like the one at https://github.com/mit-dci/utreexo/blob/6ac58e8b644714487118155f01240a4da4335fb8/accumulator/forest_test.go#L203-L210

Doesn't really serve much and hurts readability.