From 385564d637d10924be4864fa0790ef3d50a6ea50 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sun, 30 Sep 2018 11:25:00 +0930 Subject: [PATCH] Rename block_store functions - Specified that the block is "serialized". --- lighthouse/db/stores/block_store.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lighthouse/db/stores/block_store.rs b/lighthouse/db/stores/block_store.rs index 2166bea5a..3b5f1dace 100644 --- a/lighthouse/db/stores/block_store.rs +++ b/lighthouse/db/stores/block_store.rs @@ -18,13 +18,13 @@ impl BlockStore { } } - pub fn put_block(&self, hash: &[u8], ssz: &[u8]) + pub fn put_serialized_block(&self, hash: &[u8], ssz: &[u8]) -> Result<(), DBError> { self.db.put(DB_COLUMN, hash, ssz) } - pub fn get_block(&self, hash: &[u8]) + pub fn get_serialized_block(&self, hash: &[u8]) -> Result>, DBError> { self.db.get(DB_COLUMN, hash) @@ -70,7 +70,7 @@ mod tests { for w in 0..wc { let key = (t * w) as u8; let val = 42; - bs.put_block(&vec![key], &vec![val]).unwrap(); + bs.put_serialized_block(&vec![key], &vec![val]).unwrap(); } }); handles.push(handle); @@ -84,7 +84,7 @@ mod tests { for w in 0..write_count { let key = (t * w) as u8; assert!(bs.block_exists(&vec![key]).unwrap()); - let val = bs.get_block(&vec![key]).unwrap().unwrap(); + let val = bs.get_serialized_block(&vec![key]).unwrap().unwrap(); assert_eq!(vec![42], val); } }