Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit 58913e0

Browse files
authored
Merge pull request #653 from ethereum/java-typo
java: Fix get_block_hash implementation
2 parents 9ab1fe4 + e01ed50 commit 58913e0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

bindings/java/c/host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static struct evmc_tx_context get_tx_context_fn(struct evmc_host_context* contex
369369

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

375375
assert(context != NULL);

bindings/java/java/src/main/java/org/ethereum/evmc/Host.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static ByteBuffer get_tx_context(HostContext context) {
6969
}
7070

7171
/** Get block hash callback function. */
72-
static ByteBuffer get_block_hash_fn(HostContext context, long number) {
72+
static ByteBuffer get_block_hash(HostContext context, long number) {
7373
return ensureDirectBuffer(context.getBlockHash(number));
7474
}
7575

0 commit comments

Comments
 (0)