diff --git a/chains/devnet/genesis.json b/chains/devnet/genesis.json index 3fa9f51..ed93486 100644 --- a/chains/devnet/genesis.json +++ b/chains/devnet/genesis.json @@ -44,7 +44,7 @@ "nonce": "0x0", "timestamp": "0x0", "extraData": "0x", - "gasLimit": "0x7a1200", + "gasLimit": "0x1312D00", "difficulty": "0x0", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x0000000000000000000000000000000000000000", diff --git a/rpc/rpc_test.py b/rpc/rpc_test.py index c3561e8..ea616e7 100644 --- a/rpc/rpc_test.py +++ b/rpc/rpc_test.py @@ -37,19 +37,18 @@ def test_functionality(rpc_url): print(f"RPC request failed, Error: {str(e)}") -def test_chain_id(rpc_url, chain_id): +def test_chain_id(rpc_url, expected_chain_id): payload = { "jsonrpc": "2.0", "method": "eth_chainId", - "id": chain_id, + "params": [], + "id": 1, } - - try: - response = requests.post(rpc_url, json=payload) - response_data = response.json() - print("RPC request successful, Response Data:", response_data) - except Exception as e: - print(f"RPC request failed, Error: {str(e)}") + response = requests.post(rpc_url, json=payload) + response_data = response.json() + actual_chain_id = int(response_data["result"], 16) + assert actual_chain_id == expected_chain_id, \ + f"Chain ID mismatch: expected {expected_chain_id}, got {actual_chain_id}" if __name__ == '__main__':