diff --git a/tests/config/0gchain-init-genesis.sh b/tests/config/0gchain-init-genesis.sh index bda0a7e..a42a9eb 100644 --- a/tests/config/0gchain-init-genesis.sh +++ b/tests/config/0gchain-init-genesis.sh @@ -62,6 +62,15 @@ for ((i=0; i<$NUM_NODES; i++)) do CONFIG_TOML=$ROOT_DIR/node$i/config/config.toml sed -i '/seeds = /c\seeds = ""' $CONFIG_TOML sed -i 's/addr_book_strict = true/addr_book_strict = false/' $CONFIG_TOML + + # Change block time to very small + sed -i '/timeout_propose = "3s"/c\timeout_propose = "300ms"' $CONFIG_TOML + sed -i '/timeout_propose_delta = "500ms"/c\timeout_propose_delta = "50ms"' $CONFIG_TOML + sed -i '/timeout_prevote = "1s"/c\timeout_prevote = "100ms"' $CONFIG_TOML + sed -i '/timeout_prevote_delta = "500ms"/c\timeout_prevote_delta = "50ms"' $CONFIG_TOML + sed -i '/timeout_precommit = "1s"/c\timeout_precommit = "100ms"' $CONFIG_TOML + sed -i '/timeout_precommit_delta = "500ms"/c\timeout_precommit_delta = "50ms"' $CONFIG_TOML + sed -i '/timeout_commit = "5s"/c\timeout_commit = "500ms"' $CONFIG_TOML done # Update persistent_peers in config.toml diff --git a/tests/test_framework/test_framework.py b/tests/test_framework/test_framework.py index b693eea..8448a05 100644 --- a/tests/test_framework/test_framework.py +++ b/tests/test_framework/test_framework.py @@ -167,8 +167,8 @@ class TestFramework: # sync_blocks(self.blockchain_nodes) elif self.blockchain_node_type == BlockChainNodeType.ZG: # wait for the first block - self.log.debug("Wait 3 seconds for 0gchain node to generate first block") - time.sleep(3) + self.log.debug("Wait for 0gchain node to generate first block") + time.sleep(0.5) for node in self.blockchain_nodes: wait_until(lambda: node.net_peerCount() == self.num_blockchain_nodes - 1) wait_until(lambda: node.eth_blockNumber() is not None)