コード例 #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;
}