From 28b6dab21f1bc1604d11aa2b0e40b816df59a9b2 Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Wed, 31 May 2017 17:21:44 -0700 Subject: [PATCH] Fix partial revert --- chain/src/store.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/chain/src/store.rs b/chain/src/store.rs index 71940940a..0b1f92c72 100644 --- a/chain/src/store.rs +++ b/chain/src/store.rs @@ -97,9 +97,8 @@ impl ChainStore for ChainKVStore { for out in &b.outputs { let mut out_bytes = out.commit.as_ref().to_vec(); println!("OUTSAVE: {:?}", out_bytes); - batch = batch.put_enc(&mut BlockCodec::default(), - &to_key(OUTPUT_COMMIT_PREFIX, &mut out_bytes)[..], - out.hash().clone())?; + batch = batch.put_ser(&to_key(OUTPUT_COMMIT_PREFIX, &mut out_bytes)[..], + &out.hash())?; } batch.write() } @@ -114,8 +113,7 @@ impl ChainStore for ChainKVStore { } fn get_output_by_commit(&self, commit: &Commitment) -> Result { - option_to_not_found(self.db.get_dec(&mut BlockCodec::default(), - &to_key(OUTPUT_COMMIT_PREFIX, + option_to_not_found(self.db.get_ser(&to_key(OUTPUT_COMMIT_PREFIX, &mut commit.as_ref().to_vec()))) }