예제 #1
0
파일: internal.c 프로젝트: sontol/ethash
void ethash_light(ethash_return_value *ret,
                  ethash_cache const *cache,
                  ethash_params const *params,
                  ethash_h256_t const *header_hash,
                  const uint64_t nonce)
{
    ethash_hash(ret, NULL, cache, params, header_hash, nonce, NULL);
}
예제 #2
0
파일: internal.c 프로젝트: sontol/ethash
void ethash_full(ethash_return_value *ret,
                 void const *full_mem,
                 ethash_params const *params,
                 ethash_h256_t const *header_hash,
                 const uint64_t nonce)
{
    ethash_hash(ret, (node const *) full_mem, NULL, params, header_hash, nonce, NULL);
}
예제 #3
0
파일: internal.c 프로젝트: sontol/ethash
bool ethash_light_compute(ethash_return_value *ret,
                          ethash_light_t light,
                          ethash_params const *params,
                          const ethash_h256_t *header_hash,
                          const uint64_t nonce)
{
    return ethash_hash(ret, NULL, light->cache, params, header_hash, nonce, NULL);
}
예제 #4
0
파일: internal.c 프로젝트: 0rand/Spectrum
ethash_return_value_t ethash_light_compute_internal(
	ethash_light_t light,
	uint64_t full_size,
	ethash_h256_t const header_hash,
	uint64_t nonce
)
{
  	ethash_return_value_t ret;
	ret.success = true;
	if (!ethash_hash(&ret, NULL, light, full_size, header_hash, nonce)) {
		ret.success = false;
	}
	return ret;
}
예제 #5
0
파일: internal.c 프로젝트: sontol/ethash
bool ethash_full_compute(ethash_return_value *ret,
                         ethash_full_t full,
                         ethash_params const *params,
                         const ethash_h256_t *header_hash,
                         const uint64_t nonce)
{
    return ethash_hash(ret,
                       (node const*)full->data,
                       NULL,
                       params,
                       header_hash,
                       nonce,
                       full->callback);
}
예제 #6
0
파일: internal.c 프로젝트: 0rand/Spectrum
ethash_return_value_t ethash_full_compute(
	ethash_full_t full,
	ethash_h256_t const header_hash,
	uint64_t nonce
)
{
	ethash_return_value_t ret;
	ret.success = true;
	if (!ethash_hash(
		&ret,
		(node const*)full->data,
		NULL,
		full->file_size,
		header_hash,
		nonce)) {
		ret.success = false;
	}
	return ret;
}