@@ -29,6 +29,14 @@ async def test_lightchain_integration(request, event_loop):
2929 In order to run this you need to pass the following to pytest:
3030
3131 pytest --integration --enode=...
32+
33+ If you don't have any geth testnet data ready, it is very quick to generate some with:
34+
35+ geth --testnet --syncmode full
36+
37+ You only need the first 11 blocks for this test to succeed. Then you can restart geth with:
38+
39+ geth --testnet --lightserv 90 --nodiscover
3240 """
3341 # TODO: Implement a pytest fixture that runs geth as above, so that we don't need to run it
3442 # manually.
@@ -88,10 +96,9 @@ async def wait_for_header_sync(block_number):
8896 # we specify in the query, but because of fast sync we can only assume it has that for recent
8997 # blocks, so we use the current head to lookup the code for the contract below.
9098 # https://ropsten.etherscan.io/address/0x95a48dca999c89e4e284930d9b9af973a7481287
91- contract_addr = decode_hex ('95a48dca999c89e4e284930d9b9af973a7481287 ' )
99+ contract_addr = decode_hex ('0x8B09D9ac6A4F7778fCb22852e879C7F3B2bEeF81 ' )
92100 contract_code = await peer_chain .get_contract_code (head .hash , contract_addr )
93- assert encode_hex (keccak (contract_code )) == (
94- '0x1e0b2ad970b365a217c40bcf3582cbb4fcc1642d7a5dd7a82ae1e278e010123e' )
101+ assert encode_hex (contract_code ) == '0x600060006000600060006000356000f1'
95102
96103 account = await peer_chain .get_account (head .hash , contract_addr )
97104 assert account .code_hash == keccak (contract_code )
0 commit comments