From 5864e71eecf4bee3521df44faaeec64ac0459c46 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Thu, 13 Oct 2022 10:38:59 -0600 Subject: [PATCH] Add comment to call out the storage details of diversifier indices. Co-authored-by: Daira Hopwood --- zcash_client_sqlite/src/prepared.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zcash_client_sqlite/src/prepared.rs b/zcash_client_sqlite/src/prepared.rs index 5d99dca43..a605a7d67 100644 --- a/zcash_client_sqlite/src/prepared.rs +++ b/zcash_client_sqlite/src/prepared.rs @@ -67,6 +67,7 @@ impl<'a> InsertAddress<'a> { mut diversifier_index: DiversifierIndex, address: &UnifiedAddress, ) -> Result<(), rusqlite::Error> { + // the diversifier index is stored in big-endian order to allow sorting diversifier_index.0.reverse(); self.stmt.execute(named_params![ ":account": &u32::from(account),