Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java: Fix get_block_hash implementation #653

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/java/c/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ static struct evmc_tx_context get_tx_context_fn(struct evmc_host_context* contex

static evmc_bytes32 get_block_hash_fn(struct evmc_host_context* context, int64_t number)
{
char java_method_name[] = "get_code_hash";
char java_method_name[] = "get_block_hash";
char java_method_signature[] = "(Lorg/ethereum/evmc/HostContext;J)Ljava/nio/ByteBuffer;";

assert(context != NULL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static ByteBuffer get_tx_context(HostContext context) {
}

/** Get block hash callback function. */
static ByteBuffer get_block_hash_fn(HostContext context, long number) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed this a the other ones don't have the _fn suffix.

static ByteBuffer get_block_hash(HostContext context, long number) {
return ensureDirectBuffer(context.getBlockHash(number));
}

Expand Down