Skip to content

Commit

Permalink
put back data filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
guplersaxanoid committed Jun 24, 2022
1 parent b5a3124 commit baaa237
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/node/src/indexer/indexer.manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
CosmosMessage,
CosmosTransaction,
} from '@subql/types-cosmos';
import { conformsTo } from 'lodash';
import { Sequelize } from 'sequelize';
import { NodeConfig } from '../configure/NodeConfig';
import { SubqlProjectDs, SubqueryProject } from '../configure/SubqueryProject';
Expand Down Expand Up @@ -293,8 +294,11 @@ export class IndexerManager {

const blockData = BlockContentTypeMap[kind](block);

for (const handler of handlers) {
for (const data of blockData) {
for (const data of blockData) {
const filteredHandlers = handlers.filter((h) =>
FilterTypeMap[kind](data as any, h.filter),
);
for (const handler of filteredHandlers) {
await vm.securedExec(handler.handler, [data]);
}
}
Expand Down

0 comments on commit baaa237

Please sign in to comment.