Skip to content

Commit f575ba0

Browse files
committed
Move rust SPV verification into ga_rust class implementation
1 parent 01ec572 commit f575ba0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/ga_rust.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,5 +575,11 @@ namespace sdk {
575575

576576
void ga_rust::disable_all_pin_logins() {}
577577

578+
int32_t ga_rust::spv_verify_tx(const nlohmann::json& details)
579+
{
580+
auto rustinput = gdkrust_json(details).get();
581+
return GDKRUST_spv_verify_tx(rustinput);
582+
}
583+
578584
} // namespace sdk
579585
} // namespace ga

src/ga_rust.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ namespace sdk {
184184
void set_local_encryption_keys(const pub_key_t& public_key, bool is_hw_wallet);
185185
void disable_all_pin_logins();
186186

187+
static int32_t spv_verify_tx(const nlohmann::json& details);
188+
187189
private:
188190
static void GDKRUST_notif_handler(void* self_context, GDKRUST_json* json);
189191

src/utils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ namespace sdk {
169169
int32_t spv_verify_tx(const nlohmann::json& details)
170170
{
171171
#ifdef BUILD_GDK_RUST
172-
auto rustinput = gdkrust_json(details).get();
173-
return GDKRUST_spv_verify_tx(rustinput);
172+
return ga_rust::spv_verify_tx(details);
174173
#else
175174
(void)details;
176175
GDK_RUNTIME_ASSERT_MSG(false, "SPV not implemented");

0 commit comments

Comments
 (0)