Assert we never attempt to checkpoint the Orchard wallet at a negative block height.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Kris Nuttycombe 2022-03-04 11:36:03 -07:00 committed by Kris Nuttycombe
parent 6171f27b02
commit faffe2e084
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ public:
* height scanned for transactions. This must be called exactly once per block.
*/
bool CheckpointNoteCommitmentTree(int nBlockHeight) {
assert(nBlockHeight >= 0);
return orchard_wallet_checkpoint(inner.get(), (uint32_t) nBlockHeight);
}