Explorar o código

updated NOTE_PLAINTEXT_SIZE changing size for asset_id from 8 bytes to 32 bytes because type changed from u64 to Scalar

narodnik %!s(int64=4) %!d(string=hai) anos
pai
achega
fac75137dc
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      src/crypto/note.rs

+ 6 - 5
src/crypto/note.rs

@@ -7,11 +7,12 @@ use super::diffie_hellman::{kdf_sapling, sapling_ka_agree};
 use crate::error::{Error, Result};
 use crate::serial::{Decodable, Encodable, ReadExt, WriteExt};
 
-pub const NOTE_PLAINTEXT_SIZE: usize = 32 + // serial
-    8 + // value
-    8 + // asset_id
-    32 + // coin_blind
-    32; // valcom_blind
+pub const NOTE_PLAINTEXT_SIZE: usize =
+    32 +    // serial
+    8 +     // value
+    32 +    // asset_id
+    32 +    // coin_blind
+    32;     // valcom_blind
 pub const AEAD_TAG_SIZE: usize = 16;
 pub const ENC_CIPHERTEXT_SIZE: usize = NOTE_PLAINTEXT_SIZE + AEAD_TAG_SIZE;