mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
functional_tests: add a large (many randomx epochs) p2p reorg test
This commit is contained in:
parent
6a0b3b1f8a
commit
d20ff4f648
2 changed files with 54 additions and 4 deletions
|
@ -139,6 +139,25 @@ class P2PTest():
|
|||
assert res.height == height + 6
|
||||
assert res.top_block_hash == daemon2_top_block_hash
|
||||
|
||||
# disconnect and mine a lot on daemon3
|
||||
daemon2.out_peers(0)
|
||||
daemon3.out_peers(0)
|
||||
res = daemon3.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 500)
|
||||
|
||||
# reconnect and wait for sync
|
||||
daemon2.out_peers(8)
|
||||
daemon3.out_peers(8)
|
||||
loops = 100
|
||||
while True:
|
||||
res2 = daemon2.get_info()
|
||||
res3 = daemon3.get_info()
|
||||
if res2.top_block_hash == res3.top_block_hash:
|
||||
break
|
||||
time.sleep(10)
|
||||
loops -= 1
|
||||
assert loops >= 0
|
||||
|
||||
|
||||
def test_p2p_tx_propagation(self):
|
||||
print('Testing P2P tx propagation')
|
||||
daemon2 = Daemon(idx = 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue