Skip to content

Commit

Permalink
Use nonverifiable storage for compact block translation
Browse files Browse the repository at this point in the history
This is where they actually are
  • Loading branch information
cronokirby committed Apr 24, 2024
1 parent fa674ce commit 93a593a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/bin/pd/src/migrate/testnet72.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Contains functions related to the migration script of Testnet72
use anyhow;
use cnidarium::{Snapshot, StateDelta, StateRead, Storage};
use cnidarium::{Snapshot, StateDelta, StateRead, StateWrite, Storage};
use futures::StreamExt as _;
use jmt::RootHash;
use penumbra_app::app::StateReadExt as _;
Expand Down Expand Up @@ -114,12 +114,12 @@ async fn translate_compact_block_storage(
ctx: Context,
delta: &mut StateDelta<Snapshot>,
) -> anyhow::Result<()> {
let mut stream = delta.prefix_raw("compactblock/");
let mut stream = delta.nonverifiable_prefix_raw("compactblock/".as_bytes());
while let Some(r) = stream.next().await {
let (key, compactblack_bytes): (String, Vec<u8>) = r?;
let (key, compactblack_bytes) = r?;
let block = pb::compact_block::v1::CompactBlock::decode(compactblack_bytes.as_slice())?;
let block = ctx.translate_compact_block(block).await?;
delta.put_proto(key, block);
delta.nonverifiable_put_raw(key, block.encode_to_vec());
}
Ok(())
}
Expand Down

0 comments on commit 93a593a

Please sign in to comment.