summary refs log tree commit diff
path: root/ripple
diff options
context:
space:
mode:
Diffstat (limited to 'ripple')
-rw-r--r--ripple/fossil/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ripple/fossil/src/lib.rs b/ripple/fossil/src/lib.rs
index 8ed5410..37df3bd 100644
--- a/ripple/fossil/src/lib.rs
+++ b/ripple/fossil/src/lib.rs
@@ -11,6 +11,7 @@ pub mod store {
 	include!(concat!(env!("OUT_DIR"), "/fossil.store.rs"));
 }
 
+const CHUNK_BYTES: usize = blake3::CHUNK_LEN;
 const DIGEST_BYTES: usize = blake3::OUT_LEN;
 const OFFSET_BYTES: usize = 4;
 
@@ -86,7 +87,7 @@ impl Store {
 
 		self.db
 			.transaction::<_, _, sled::Error>(|db| {
-				for (n, chunk) in data.chunks(4096).enumerate() {
+				for (n, chunk) in data.chunks(CHUNK_BYTES).enumerate() {
 					let mut key = [0u8; DIGEST_BYTES + OFFSET_BYTES];
 					key[..DIGEST_BYTES].copy_from_slice(&digest);
 					BigEndian::write_u32(&mut key[DIGEST_BYTES..], n as u32);