Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
fe28aa22
Commit
fe28aa22
authored
Jun 23, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint: fix
Lints the `fault-detector`. Not sure how this made it through CI.
parent
2b168bf8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
helpers.ts
packages/fault-detector/src/helpers.ts
+3
-1
service.ts
packages/fault-detector/src/service.ts
+7
-2
helpers.spec.ts
packages/fault-detector/test/helpers.spec.ts
+4
-7
No files found.
packages/fault-detector/src/helpers.ts
View file @
fe28aa22
...
@@ -23,7 +23,9 @@ export const findOutputForIndex = async (
...
@@ -23,7 +23,9 @@ export const findOutputForIndex = async (
l2OutputIndex
:
index
,
l2OutputIndex
:
index
,
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
logger
?.
fatal
(
'
error when calling L2OuputOracle.getL2Output
'
,
{
errors
:
err
})
logger
?.
fatal
(
'
error when calling L2OuputOracle.getL2Output
'
,
{
errors
:
err
,
})
throw
new
Error
(
`unable to find output for index
${
index
}
`
)
throw
new
Error
(
`unable to find output for index
${
index
}
`
)
}
}
}
}
...
...
packages/fault-detector/src/service.ts
View file @
fe28aa22
...
@@ -6,7 +6,12 @@ import {
...
@@ -6,7 +6,12 @@ import {
validators
,
validators
,
waitForProvider
,
waitForProvider
,
}
from
'
@eth-optimism/common-ts
'
}
from
'
@eth-optimism/common-ts
'
import
{
BedrockOutputData
,
getChainId
,
sleep
,
toRpcHexString
}
from
'
@eth-optimism/core-utils
'
import
{
BedrockOutputData
,
getChainId
,
sleep
,
toRpcHexString
,
}
from
'
@eth-optimism/core-utils
'
import
{
config
}
from
'
dotenv
'
import
{
config
}
from
'
dotenv
'
import
{
import
{
CONTRACT_ADDRESSES
,
CONTRACT_ADDRESSES
,
...
@@ -382,7 +387,7 @@ export class FaultDetector extends BaseServiceV2<Options, Metrics, State> {
...
@@ -382,7 +387,7 @@ export class FaultDetector extends BaseServiceV2<Options, Metrics, State> {
new
Date
(
new
Date
(
(
ethers
.
BigNumber
.
from
(
outputBlock
.
timestamp
).
toNumber
()
+
(
ethers
.
BigNumber
.
from
(
outputBlock
.
timestamp
).
toNumber
()
+
this
.
state
.
faultProofWindow
)
*
this
.
state
.
faultProofWindow
)
*
1000
1000
),
),
'
mmmm dS, yyyy, h:MM:ss TT
'
'
mmmm dS, yyyy, h:MM:ss TT
'
),
),
...
...
packages/fault-detector/test/helpers.spec.ts
View file @
fe28aa22
...
@@ -5,10 +5,7 @@ import { getContractFactory } from '@eth-optimism/contracts-bedrock'
...
@@ -5,10 +5,7 @@ import { getContractFactory } from '@eth-optimism/contracts-bedrock'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
SignerWithAddress
}
from
'
@nomiclabs/hardhat-ethers/signers
'
import
{
expect
}
from
'
./setup
'
import
{
expect
}
from
'
./setup
'
import
{
import
{
findOutputForIndex
,
findFirstUnfinalizedStateBatchIndex
}
from
'
../src
'
findOutputForIndex
,
findFirstUnfinalizedStateBatchIndex
,
}
from
'
../src
'
describe
(
'
helpers
'
,
()
=>
{
describe
(
'
helpers
'
,
()
=>
{
const
deployConfig
=
{
const
deployConfig
=
{
...
@@ -108,7 +105,7 @@ describe('helpers', () => {
...
@@ -108,7 +105,7 @@ describe('helpers', () => {
await
L2OutputOracle
.
proposeL2Output
(
await
L2OutputOracle
.
proposeL2Output
(
utils
.
formatBytes32String
(
'
outputRoot3
'
),
utils
.
formatBytes32String
(
'
outputRoot3
'
),
params
.
_l2BlockNumber
+
params
.
_l2BlockNumber
+
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
params
.
_l1BlockHash
,
params
.
_l1BlockHash
,
params
.
_l1BlockNumber
params
.
_l1BlockNumber
)
)
...
@@ -150,7 +147,7 @@ describe('helpers', () => {
...
@@ -150,7 +147,7 @@ describe('helpers', () => {
await
L2OutputOracle
.
proposeL2Output
(
await
L2OutputOracle
.
proposeL2Output
(
params
.
_outputRoot
,
params
.
_outputRoot
,
params
.
_l2BlockNumber
+
params
.
_l2BlockNumber
+
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
params
.
_l1BlockHash
,
params
.
_l1BlockHash
,
params
.
_l1BlockNumber
params
.
_l1BlockNumber
)
)
...
@@ -192,7 +189,7 @@ describe('helpers', () => {
...
@@ -192,7 +189,7 @@ describe('helpers', () => {
await
L2OutputOracle
.
proposeL2Output
(
await
L2OutputOracle
.
proposeL2Output
(
params
.
_outputRoot
,
params
.
_outputRoot
,
params
.
_l2BlockNumber
+
params
.
_l2BlockNumber
+
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
deployConfig
.
l2OutputOracleSubmissionInterval
*
2
,
params
.
_l1BlockHash
,
params
.
_l1BlockHash
,
params
.
_l1BlockNumber
params
.
_l1BlockNumber
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment