Skip to content

Commit

Permalink
Remove deprecated ethash_verify()
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Aug 24, 2022
1 parent 0c08e96 commit eb31008
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.0.0] — unreleased

- Removed: Deprecated function `ethash_verify()` has been removed.
Use `ethash_verify_against_boundary()`.
[#226](https://github.com/chfast/ethash/pull/226)

## [0.9.0] — 2022-04-05

- Added: The constant `ETHASH_MAX_EPOCH_NUMBER = 32639` representing
Expand Down Expand Up @@ -138,6 +144,7 @@
- Added: Experimental support for [ProgPoW] [0.9.1][ProgPoW-changelog].


[1.0.0]: https://github.com/chfast/ethash/compare/v0.9.0..master
[0.9.0]: https://github.com/chfast/ethash/releases/tag/v0.9.0
[0.8.0]: https://github.com/chfast/ethash/releases/tag/v0.8.0
[0.7.1]: https://github.com/chfast/ethash/releases/tag/v0.7.1
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/ethash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ def verify(epoch_number, header_hash, mix_hash, nonce, boundary):
c_boundary = ffi.new('union ethash_hash256*')
c_boundary[0].str = boundary

ec = lib.ethash_verify(ctx, c_header_hash, c_mix_hash, nonce, c_boundary)
ec = lib.ethash_verify_against_boundary(ctx, c_header_hash, c_mix_hash, nonce, c_boundary)
return ec == 0
2 changes: 1 addition & 1 deletion bindings/python/ethash/_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
struct ethash_result ethash_hash(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, uint64_t nonce);
bool ethash_verify(const struct ethash_epoch_context* context,
bool ethash_verify_against_boundary(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, const union ethash_hash256* mix_hash, uint64_t nonce,
const union ethash_hash256* boundary);
Expand Down
19 changes: 0 additions & 19 deletions include/ethash/ethash.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@

#pragma clang diagnostic pop

#if defined(__cplusplus) && __has_cpp_attribute(deprecated) < __cplusplus
#define DEPRECATED(MSG) [[deprecated(MSG)]]
#elif __has_attribute(deprecated)
#define DEPRECATED(MSG) __attribute__((deprecated(MSG)))
#else
#define DEPRECATED(MSG)
#endif

#ifndef __cplusplus
#define noexcept // Ignore noexcept in C code.
#endif
Expand Down Expand Up @@ -180,17 +172,6 @@ ethash_errc ethash_verify_against_difficulty(const struct ethash_epoch_context*
const union ethash_hash256* difficulty) noexcept;


/**
* @deprecated Use ethash_verify_against_boundary().
*/
DEPRECATED("use ethash_verify_against_boundary()")
static inline ethash_errc ethash_verify(const struct ethash_epoch_context* context,
const union ethash_hash256* header_hash, const union ethash_hash256* mix_hash, uint64_t nonce,
const union ethash_hash256* boundary) noexcept
{
return ethash_verify_against_boundary(context, header_hash, mix_hash, nonce, boundary);
}

/**
* Verify only the final hash. This can be performed quickly without accessing Ethash context.
*
Expand Down

0 comments on commit eb31008

Please sign in to comment.