From 1d48cb1ea7d24e27dca2b04934e20eaab3605619 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:13:31 +0800 Subject: [PATCH] Use 0gchain to test mine tests (#191) * Use 0gchain to test mine tests * adjust zg block time --- tests/mine_test.py | 2 +- tests/mine_with_market_test.py | 2 +- tests/test_framework/blockchain_node.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/mine_test.py b/tests/mine_test.py index 19628b6..b4f9536 100755 --- a/tests/mine_test.py +++ b/tests/mine_test.py @@ -80,4 +80,4 @@ class MineTest(TestFramework): if __name__ == "__main__": - MineTest(blockchain_node_type=BlockChainNodeType.BSC).main() + MineTest().main() diff --git a/tests/mine_with_market_test.py b/tests/mine_with_market_test.py index dbdea9f..11acf53 100755 --- a/tests/mine_with_market_test.py +++ b/tests/mine_with_market_test.py @@ -106,4 +106,4 @@ class MineTest(TestFramework): if __name__ == "__main__": - MineTest(blockchain_node_type=BlockChainNodeType.BSC).main() + MineTest().main() diff --git a/tests/test_framework/blockchain_node.py b/tests/test_framework/blockchain_node.py index f08b293..491268c 100644 --- a/tests/test_framework/blockchain_node.py +++ b/tests/test_framework/blockchain_node.py @@ -31,8 +31,10 @@ class BlockChainNodeType(Enum): return 0.5 elif self == BlockChainNodeType.BSC: return 32 / estimate_st_performance() + elif self == BlockChainNodeType.ZG: + return 0.5 else: - return 5.0 + raise AssertionError("Unsupported blockchain type") @unique class NodeType(Enum):