Commit e3dc90cb authored by Karl Floersch's avatar Karl Floersch Committed by GitHub

fix: lint errors in dtl (#1025)

parent 8ac4c74c
......@@ -29,6 +29,7 @@
"@sentry/node": "^6.3.1",
"@sentry/tracing": "^6.3.1",
"@types/express": "^4.17.11",
"axios": "^0.21.1",
"bcfg": "^0.1.6",
"bfj": "^7.0.2",
"browser-or-node": "^1.3.0",
......
......@@ -3,8 +3,8 @@ import { BaseService } from '@eth-optimism/common-ts'
import { JsonRpcProvider } from '@ethersproject/providers'
import { BigNumber } from 'ethers'
import { LevelUp } from 'levelup'
import axios from 'axios';
import bfj from 'bfj';
import axios from 'axios'
import bfj from 'bfj'
/* Imports: Internal */
import { TransportDB } from '../../db/transport-db'
......@@ -184,13 +184,17 @@ export class L2IngestionService extends BaseService<L2IngestionServiceOptions> {
true,
],
id: '1',
};
}
const resp = await axios.post(this.state.l2RpcProvider.connection.url, req, {responseType: 'stream'});
const respJson = await bfj.parse(resp.data, {
yieldRate: 4096 // this yields abit more often than the default of 16384
});
const blocks = respJson.data;
const resp = await axios.post(
this.state.l2RpcProvider.connection.url,
req,
{ responseType: 'stream' }
)
const respJson = await bfj.parse(resp.data, {
yieldRate: 4096, // this yields abit more often than the default of 16384
})
blocks = respJson.data
}
for (const block of blocks) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment