Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions blockchain/chain/src/store/chain_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
use anyhow::Result;
use async_stream::stream;
use bls_signatures::Serialize as SerializeBls;
use cid::{multihash::Code::Blake2b256, Cid};
use cid::{
multihash::{Code, Code::Blake2b256},
Cid,
};
use digest::Digest;
use forest_actor_interface::EPOCHS_IN_DAY;
use forest_beacon::{BeaconEntry, IGNORE_DRAND_VAR};
Expand Down Expand Up @@ -564,7 +567,15 @@ where
.get(&cid)?
.ok_or_else(|| Error::Other(format!("Cid {cid} not found in blockstore")))?;

tx_clone.send_async((cid, block.clone())).await?;
// Don't include identity CIDs.
// We only include raw and dagcbor, for now.
// Raw for "code" CIDs.
if u64::from(Code::Identity) != cid.hash().code()
&& (cid.codec() == fvm_shared::IPLD_RAW
|| cid.codec() == fvm_ipld_encoding::DAG_CBOR)
{
tx_clone.send_async((cid, block.clone())).await?;
}
Ok(block)
}
})
Expand Down