Skip to content

Commit 20a973d

Browse files
committed
review changes
1 parent 56ac0ba commit 20a973d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/p2p/test_get_best_blockchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ def test_best_blockchain_from_storage(self) -> None:
279279

280280
# cache miss if best block doesn't match
281281
fake_block = HeightInfo(1, b'fake hash')
282+
# manager1._latest_n_height_tips = [fake_block] # FIXME: This property is not defined. Fix this test.
282283
best_blockchain = manager1.tx_storage.get_n_height_tips(1) # there is only the genesis block
283284
block = best_blockchain[0]
284285
# the memoized best_blockchain is skiped

tests/p2p/test_split_brain.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def create_peer(self, network: str, unlock_wallet: bool = True) -> HathorManager
2929

3030
manager = super().create_peer(network, wallet=wallet)
3131
manager.daa.TEST_MODE = TestMode.TEST_ALL_WEIGHT
32+
# manager.avg_time_between_blocks = 64 # FIXME: This property is not defined. Fix this test.
3233

3334
# Don't use it anywhere else. It is unsafe to generate mnemonic words like this.
3435
# It should be used only for testing purposes.
@@ -42,8 +43,10 @@ def test_split_brain_plain(self) -> None:
4243
debug_pdf = False
4344

4445
manager1 = self.create_peer(self.network, unlock_wallet=True)
46+
# manager1.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
4547

4648
manager2 = self.create_peer(self.network, unlock_wallet=True)
49+
# manager2.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
4750

4851
for _ in range(10):
4952
add_new_block(manager1, advance_clock=1)
@@ -101,8 +104,10 @@ def test_split_brain_plain(self) -> None:
101104
@pytest.mark.slow
102105
def test_split_brain_only_blocks_different_height(self) -> None:
103106
manager1 = self.create_peer(self.network, unlock_wallet=True)
107+
# manager1.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
104108

105109
manager2 = self.create_peer(self.network, unlock_wallet=True)
110+
# manager2.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
106111

107112
for _ in range(10):
108113
add_new_block(manager1, advance_clock=1)
@@ -144,8 +149,10 @@ def test_split_brain_only_blocks_different_height(self) -> None:
144149
# For now we are voiding everyone until the first common block
145150
def test_split_brain_only_blocks_same_height(self) -> None:
146151
manager1 = self.create_peer(self.network, unlock_wallet=True)
152+
# manager1.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
147153

148154
manager2 = self.create_peer(self.network, unlock_wallet=True)
155+
# manager2.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
149156

150157
for _ in range(10):
151158
add_new_block(manager1, advance_clock=1)
@@ -265,8 +272,10 @@ def test_split_brain_only_blocks_same_height(self) -> None:
265272

266273
def test_split_brain_only_blocks_bigger_score(self) -> None:
267274
manager1 = self.create_peer(self.network, unlock_wallet=True)
275+
# manager1.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
268276

269277
manager2 = self.create_peer(self.network, unlock_wallet=True)
278+
# manager2.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
270279

271280
# Start with 1 because of the genesis block
272281
manager2_blocks = 1
@@ -323,9 +332,11 @@ def test_split_brain_only_blocks_bigger_score(self) -> None:
323332

324333
def test_split_brain_no_double_spending(self) -> None:
325334
manager1 = self.create_peer(self.network, unlock_wallet=True)
335+
# manager1.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
326336
manager1.connections.disable_rate_limiter()
327337

328338
manager2 = self.create_peer(self.network, unlock_wallet=True)
339+
# manager2.avg_time_between_blocks = 3 # FIXME: This property is not defined. Fix this test.
329340
manager2.connections.disable_rate_limiter()
330341

331342
winner_blocks = 1

0 commit comments

Comments
 (0)