Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit df7f37a

Browse files
author
adria0
committed
Better naming
1 parent 7ea56e9 commit df7f37a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

geth-utils/lib/lib.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ type GetWitnessRequest struct {
5050
Mods []witness.TrieModification
5151
}
5252

53-
//export GetWitness
54-
func GetWitness(proofConf *C.char) *C.char {
53+
//export GetMptWitness
54+
func GetMptWitness(proofConf *C.char) *C.char {
5555
var config GetWitnessRequest
5656

5757
err := json.Unmarshal([]byte(C.GoString(proofConf)), &config)

geth-utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod go {
1010
use std::os::raw::c_char;
1111
extern "C" {
1212
pub fn CreateTrace(str: *const c_char) -> *const c_char;
13-
pub fn GetWitness(str: *const c_char) -> *const c_char;
13+
pub fn GetMptWitness(str: *const c_char) -> *const c_char;
1414
pub fn FreeString(str: *const c_char);
1515
}
1616
}

geth-utils/src/mpt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn get_witness(block_no: u64, mods: &[TrieModification], node_url: &str) ->
8686

8787
let json = serde_json::to_string(&req).expect("Invalid request");
8888
let c_config = CString::new(json).expect("invalid config");
89-
let result = unsafe { go::GetWitness(c_config.as_ptr() as *const i8) };
89+
let result = unsafe { go::GetMptWitness(c_config.as_ptr() as *const i8) };
9090
let c_str = unsafe { CStr::from_ptr(result) };
9191
let json = c_str
9292
.to_str()

0 commit comments

Comments
 (0)