|
52 | 52 | Print("Stand up cluster") |
53 | 53 | # Custom topology: |
54 | 54 | # prodNode <-> nonProdNode |
55 | | - # <-> throttlingNode <-> throttledNode |
56 | | - # <-> unThrottledNode |
| 55 | + # <-> throttlingNode <-> throttledNode (20KB/s) |
| 56 | + # <-> unThrottledNode (1TB/s) |
57 | 57 | # |
58 | 58 | # Compare the sync time of throttledNode and unThrottledNode |
59 | 59 | if cluster.launch(pnodes=pnodes, unstartedNodes=3, totalNodes=total_nodes, prodCount=prod_count, |
|
109 | 109 | throttlingNode.cmd[i+1] = throttlingNode.cmd[i+1] + ':20KB/s' |
110 | 110 | throttleListenIP, throttleListenPort = throttleListenAddr.split(':') |
111 | 111 | throttlingNode.cmd.append('--p2p-listen-endpoint') |
112 | | - throttlingNode.cmd.append(f'{throttleListenIP}:{int(throttleListenPort)+100}:1TB/s') |
| 112 | + unThrottleListenAddr = f'{throttleListenIP}:{int(throttleListenPort)+100}' |
| 113 | + throttlingNode.cmd.append(f'{unThrottleListenAddr}:1TB/s') |
113 | 114 |
|
114 | 115 | cluster.biosNode.kill(signal.SIGTERM) |
115 | 116 |
|
116 | 117 | Print("Launch throttling node") |
117 | 118 | cluster.launchUnstarted(1) |
118 | | - |
119 | 119 | assert throttlingNode.verifyAlive(), "throttling node did not launch" |
120 | 120 |
|
121 | 121 | # Throttling node was offline during block generation and once online receives blocks as fast as possible |
122 | 122 | assert throttlingNode.waitForBlock(endLargeBlocksHeadBlock), f'wait for block {endLargeBlocksHeadBlock} on throttled node timed out' |
123 | 123 |
|
| 124 | + throttledNode = cluster.unstartedNodes[0] |
| 125 | + throttledNode.cmd.append('--p2p-peer-address') |
| 126 | + throttledNode.cmd.append(throttleListenAddr) |
| 127 | + unThrottledNode = cluster.unstartedNodes[1] |
| 128 | + unThrottledNode.cmd.append('--p2p-peer-address') |
| 129 | + unThrottledNode.cmd.append(unThrottleListenAddr) |
| 130 | + |
124 | 131 | Print("Launch throttled and un-throttled nodes") |
125 | 132 | clusterStart = time.time() |
126 | 133 | cluster.launchUnstarted(2) |
|
0 commit comments