Off-chain indexing is independent from workers (#8659)

* Pff-chain indexing is independent from worker.

* Remove unauthorized changes.

* 🤦
This commit is contained in:
Tomasz Drwięga
2021-04-22 23:37:03 +02:00
committed by GitHub
parent 166568b029
commit f7ed5a2481
2 changed files with 14 additions and 11 deletions
+6
View File
@@ -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>) {