mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
Off-chain indexing is independent from workers (#8659)
* Pff-chain indexing is independent from worker.
* Remove unauthorized changes.
* 🤦
This commit is contained in:
@@ -699,7 +699,9 @@ pub struct BlockImportOperation<Block: BlockT> {
|
||||
|
||||
impl<Block: BlockT> BlockImportOperation<Block> {
|
||||
fn apply_offchain(&mut self, transaction: &mut Transaction<DbHash>) {
|
||||
let mut count = 0;
|
||||
for ((prefix, key), value_operation) in self.offchain_storage_updates.drain(..) {
|
||||
count += 1;
|
||||
let key = crate::offchain::concatenate_prefix_and_key(&prefix, &key);
|
||||
match value_operation {
|
||||
OffchainOverlayedChange::SetValue(val) =>
|
||||
@@ -708,6 +710,10 @@ impl<Block: BlockT> BlockImportOperation<Block> {
|
||||
transaction.remove(columns::OFFCHAIN, &key),
|
||||
}
|
||||
}
|
||||
|
||||
if count > 0 {
|
||||
log::debug!(target: "sc_offchain", "Applied {} offchain indexing changes.", count);
|
||||
}
|
||||
}
|
||||
|
||||
fn apply_aux(&mut self, transaction: &mut Transaction<DbHash>) {
|
||||
|
||||
Reference in New Issue
Block a user