mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-08 12:21:09 +03:00
Fix partial revert
This commit is contained in:
parent
92a2beedef
commit
28b6dab21f
1 changed files with 3 additions and 5 deletions
|
@ -97,9 +97,8 @@ impl ChainStore for ChainKVStore {
|
||||||
for out in &b.outputs {
|
for out in &b.outputs {
|
||||||
let mut out_bytes = out.commit.as_ref().to_vec();
|
let mut out_bytes = out.commit.as_ref().to_vec();
|
||||||
println!("OUTSAVE: {:?}", out_bytes);
|
println!("OUTSAVE: {:?}", out_bytes);
|
||||||
batch = batch.put_enc(&mut BlockCodec::default(),
|
batch = batch.put_ser(&to_key(OUTPUT_COMMIT_PREFIX, &mut out_bytes)[..],
|
||||||
&to_key(OUTPUT_COMMIT_PREFIX, &mut out_bytes)[..],
|
&out.hash())?;
|
||||||
out.hash().clone())?;
|
|
||||||
}
|
}
|
||||||
batch.write()
|
batch.write()
|
||||||
}
|
}
|
||||||
|
@ -114,8 +113,7 @@ impl ChainStore for ChainKVStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_output_by_commit(&self, commit: &Commitment) -> Result<Output, Error> {
|
fn get_output_by_commit(&self, commit: &Commitment) -> Result<Output, Error> {
|
||||||
option_to_not_found(self.db.get_dec(&mut BlockCodec::default(),
|
option_to_not_found(self.db.get_ser(&to_key(OUTPUT_COMMIT_PREFIX,
|
||||||
&to_key(OUTPUT_COMMIT_PREFIX,
|
|
||||||
&mut commit.as_ref().to_vec())))
|
&mut commit.as_ref().to_vec())))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue