@ -73,6 +73,13 @@ class LogsManager {
return matchedSubscriptions
}
getLogsForSubscription(subscriptionId) {
const subscriptionParams = this.subscriptions[subscriptionId]
const [_queryType, queryFilter] = subscriptionParams
return this.getLogsFor(queryFilter);
transmit (result) {
this.notificationCallbacks.forEach((callback) => {
if (result.params.result.raw) {
@ -45,7 +45,7 @@ Implemented:
* [_] eth_newPendingTransactionFilter
* [_] eth_uninstallFilter
* [_] eth_getFilterChanges
* [_] eth_getFilterLogs
* [X] eth_getFilterLogs
* [X] eth_getLogs
* [_] eth_getWork
* [_] eth_submitWork
@ -13,7 +13,12 @@ Filters.prototype.methods = function () {
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs
Filters.prototype.eth_getFilterLogs = function (payload, cb) {
let subscriptionId = payload.params[0];
let results = executionContext.logsManager.getLogsForSubscription(subscriptionId)
cb(null, results)
Filters.prototype.eth_getLogs = function (payload, cb) {
let results = executionContext.logsManager.getLogsFor(payload.params[0])