Skip to content

Commit 1c2a769

Browse files
authored
Merge pull request #342 from lidofinance/feat/next-vote
Hardhat
2 parents e832983 + 769af16 commit 1c2a769

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

.github/workflows/large_vote_ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ jobs:
1616
name: Brownie fork LARGE tests
1717
runs-on: [protocol-heavy-runners]
1818
timeout-minutes: 150
19+
20+
services:
21+
hardhat-node:
22+
image: ghcr.io/lidofinance/hardhat-node:2.22.17
23+
ports:
24+
- 8545:8545
25+
env:
26+
ETH_RPC_URL: "https://mainnet.infura.io/v3/${{ secrets.WEB3_INFURA_PROJECT_ID }}"
27+
1928
steps:
2029
- name: Enabling swap
2130
run: |

.github/workflows/normal_vote_ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ jobs:
1414
name: Brownie fork NORMAL tests
1515
runs-on: "ubuntu-latest"
1616
timeout-minutes: 100
17+
18+
services:
19+
hardhat-node:
20+
image: ghcr.io/lidofinance/hardhat-node:2.22.17
21+
ports:
22+
- 8545:8545
23+
env:
24+
ETH_RPC_URL: "https://mainnet.infura.io/v3/${{ secrets.WEB3_INFURA_PROJECT_ID }}"
25+
1726
steps:
1827
- uses: actions/checkout@v3
1928
- name: Main action

tests/acceptance/test_accounting_oracle_negative.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
NON_ZERO_HASH = ZERO_HASH[:-1] + b"\x01"
2323
FIELDS_WIDTH = ExtraDataLengths
2424

25+
def chain_time_with_offset(offset: int) -> int:
26+
return chain.time() + offset
2527

2628
def test_sender_not_allowed(accounting_oracle: Contract, oracle_version: int, stranger: Account) -> None:
2729
report = oracle_report(dry_run=True)
@@ -80,12 +82,12 @@ def test_submitConsensusReport(accounting_oracle: Contract, hash_consensus: Cont
8082
{"from": hash_consensus},
8183
)
8284

83-
8485
with reverts(encode_error("HashCannotBeZero()")):
8586
accounting_oracle.submitConsensusReport(
8687
ZERO_HASH,
8788
last_processing_ref_slot + 1,
88-
chain.time(),
89+
# Add a few seconds of offset to account for slow block mining.
90+
chain_time_with_offset(3),
8991
{"from": hash_consensus},
9092
)
9193

0 commit comments

Comments
 (0)