Fix examples

This commit is contained in:
tevador
2019-10-09 19:49:54 +02:00
parent e0484dfb99
commit ebbe7696c7
2 changed files with 10 additions and 6 deletions

View File

@@ -6,9 +6,10 @@ int main() {
const char myInput[] = "RandomX example input";
char hash[RANDOMX_HASH_SIZE];
randomx_cache *myCache = randomx_alloc_cache(RANDOMX_FLAG_DEFAULT);
randomx_flags flags = randomx_get_flags();
randomx_cache *myCache = randomx_alloc_cache(flags);
randomx_init_cache(myCache, &myKey, sizeof myKey);
randomx_vm *myMachine = randomx_create_vm(RANDOMX_FLAG_DEFAULT, myCache, NULL);
randomx_vm *myMachine = randomx_create_vm(flags, myCache, NULL);
randomx_calculate_hash(myMachine, &myInput, sizeof myInput, hash);