Skip to content

Instantly share code, notes, and snippets.

@katlogic
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save katlogic/9d1ff04358e07c3d74d8 to your computer and use it in GitHub Desktop.

Select an option

Save katlogic/9d1ff04358e07c3d74d8 to your computer and use it in GitHub Desktop.
shabal_context tpl;
shabal_init(&tpl, 256);
shabal(&tpl, minfo->gen, 32);
for (j = 0; j < nonces_per_stagger; j++) {
u64 *info = (u64*)(&stagger[j][0]);
memcpy(&ctx, &tpl, sizeof(tpl));
shabal(&ctx, &stagger[j][0], 64);
shabal_close(&ctx, 0, 0, res);
u64 work = *((uint64_t *)res);
if (work < best_work) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment