Skip to content

Commit

Permalink
fix: lint errors in dtl
Browse files Browse the repository at this point in the history
  • Loading branch information
karlfloersch committed Jun 6, 2021
1 parent 8ac4c74 commit 95b7556
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/data-transport-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 12 additions & 8 deletions packages/data-transport-layer/src/services/l2-ingestion/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 95b7556

Please sign in to comment.