|
|
|
@ -24,7 +24,7 @@ export class LogsManager { |
|
|
|
|
if (!receipt) return next() |
|
|
|
|
for (const log of receipt.logs) { |
|
|
|
|
this.oldLogs.push({ type: 'block', blockNumber, block, tx, log, txNumber: i, receipt }) |
|
|
|
|
const subscriptions = this.getSubscriptionsFor({ type: 'block', blockNumber, block, tx, log, receipt}) |
|
|
|
|
const subscriptions = this.getSubscriptionsFor({ type: 'block', blockNumber, block, tx, log, receipt }) |
|
|
|
|
for (const subscriptionId of subscriptions) { |
|
|
|
|
const result = { |
|
|
|
|
logIndex: '0x1', // 1
|
|
|
|
@ -76,7 +76,7 @@ export class LogsManager { |
|
|
|
|
const subscriptionParams = this.subscriptions[subscriptionId] |
|
|
|
|
const [queryType, queryFilter] = subscriptionParams |
|
|
|
|
|
|
|
|
|
if (this.eventMatchesFilter(changeEvent, queryType, queryFilter || { topics: [] })) { |
|
|
|
|
if (this.eventMatchesFilter(changeEvent, queryType, queryFilter || { topics: []})) { |
|
|
|
|
matchedSubscriptions.push(subscriptionId) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -135,7 +135,7 @@ export class LogsManager { |
|
|
|
|
const tracking = this.filterTracking[filterId] |
|
|
|
|
|
|
|
|
|
if (logsOnly || filterType === 'filter') { |
|
|
|
|
return this.getLogsFor(params || { topics: [] }) |
|
|
|
|
return this.getLogsFor(params || { topics: []}) |
|
|
|
|
} |
|
|
|
|
if (filterType === 'block') { |
|
|
|
|
const blocks = this.oldLogs.filter(x => x.type === 'block').filter(x => tracking.block === undefined || x.blockNumber >= tracking.block) |
|
|
|
|