diff --git a/zcash_client_sqlite/CHANGELOG.md b/zcash_client_sqlite/CHANGELOG.md index 8e5846892..63f911ae4 100644 --- a/zcash_client_sqlite/CHANGELOG.md +++ b/zcash_client_sqlite/CHANGELOG.md @@ -8,5 +8,5 @@ and this project adheres to Rust's notion of ## [0.2.1] - 2020-10-24 ### Fixed - `transact::create_to_address` now correctly reconstructs notes from the data - DB after Canopy activation (zcash/librustzcash#311). - + DB after Canopy activation (zcash/librustzcash#311). This is critcal to correct + operation of spends after Canopy. diff --git a/zcash_client_sqlite/src/transact.rs b/zcash_client_sqlite/src/transact.rs index 2a8c8ffff..1c8a524e3 100644 --- a/zcash_client_sqlite/src/transact.rs +++ b/zcash_client_sqlite/src/transact.rs @@ -228,18 +228,18 @@ pub fn create_to_address, P: consensus::Parameters>( let note_value: i64 = row.get(1)?; let rseed = { - let d: Vec<_> = row.get(2)?; + let rcm_bytes: Vec<_> = row.get(2)?; // We store rcm directly in the data DB, regardless of whether the note // used a v1 or v2 note plaintext, so for the purposes of spending let's // pretend this is a pre-ZIP 212 note. - let r = jubjub::Fr::from_repr( - d[..] + let rcm = jubjub::Fr::from_repr( + rcm_bytes[..] .try_into() .map_err(|_| Error(ErrorKind::InvalidNote))?, ) .ok_or(Error(ErrorKind::InvalidNote))?; - Rseed::BeforeZip212(r) + Rseed::BeforeZip212(rcm) }; let from = extfvk.fvk.vk.to_payment_address(diversifier).unwrap();