diff --git a/stateless/test_block_witness.nim b/stateless/test_block_witness.nim index 546e6ab59..9830120d3 100644 --- a/stateless/test_block_witness.nim +++ b/stateless/test_block_witness.nim @@ -30,7 +30,7 @@ proc testGetBranch(tester: Tester, rootHash: KeccakHash, testStatusIMPL: var Tes #try: for address in tester.address: var wb = initWitnessBuilder(tester.memdb, rootHash) - var witness = wb.getBranchRecurse(address) + var witness = wb.buildWitness(address) var db = newMemoryDB() when defined(useInputStream): diff --git a/stateless/test_witness_keys.nim b/stateless/test_witness_keys.nim index d3b48eb79..5b01e0770 100644 --- a/stateless/test_witness_keys.nim +++ b/stateless/test_witness_keys.nim @@ -43,20 +43,23 @@ proc randAccount(db: DB): Account = result.codeHash = randCode(db) result.storageRoot = randStorage(db) +proc randAddress(): EthAddress = + discard randomBytes(result.addr, sizeof(result)) + proc runTest(numPairs: int) = var memDB = newMemoryDB() var trie = initSecureHexaryTrie(memDB) - var addrs = newSeq[Bytes](numPairs) + var addrs = newSeq[EthAddress](numPairs) for i in 0..= 0 and i < 17) x = x or (1 shl i).uint