From 909a4db994aba97c4389e472c79ae05794f28abe Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 12 Apr 2026 21:38:02 +0200 Subject: [PATCH] Fix Win64 monero_c build for raw yield API --- peya | 2 +- .../src/main/cpp/wallet2_api_c.cpp | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/peya b/peya index cf5969b..a0162b4 160000 --- a/peya +++ b/peya @@ -1 +1 @@ -Subproject commit cf5969b5dd96d78d5bcc8a2fe97c9e6522c781a5 +Subproject commit a0162b4205e4c677a491b56f28622b8d6f3f2e0e diff --git a/peya_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp b/peya_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp index 18a9d64..e717968 100644 --- a/peya_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp +++ b/peya_libwallet2_api_c/src/main/cpp/wallet2_api_c.cpp @@ -6,7 +6,6 @@ #include #include #include "../../../../peya/src/wallet/api/wallet2_api.h" -#include "wallet/api/wallet.h" #include "peya_checksum.h" #ifdef __cplusplus @@ -2314,8 +2313,8 @@ const char* PEYA_Wallet_serializeCacheToJson(void* wallet_ptr) { void* PEYA_Wallet_getYieldInfoRaw(void* wallet_ptr) { DEBUG_START() - auto *wallet = reinterpret_cast(wallet_ptr); - auto *result = new std::vector(); + auto *wallet = reinterpret_cast(wallet_ptr); + auto *result = new std::vector(); if (!wallet->getYieldInfoRaw(*result)) { delete result; return nullptr; @@ -2326,7 +2325,7 @@ void* PEYA_Wallet_getYieldInfoRaw(void* wallet_ptr) { int PEYA_YieldInfoRaw_count(void* yieldInfoRaw_ptr) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr) { return 0; } @@ -2336,57 +2335,57 @@ int PEYA_YieldInfoRaw_count(void* yieldInfoRaw_ptr) { uint64_t PEYA_YieldInfoRaw_blockHeight(void* yieldInfoRaw_ptr, int index) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr || index < 0 || static_cast(index) >= yieldInfoRaw->size()) { return 0; } - return (*yieldInfoRaw)[index].block_height; + return (*yieldInfoRaw)[index].blockHeight; DEBUG_END() } uint64_t PEYA_YieldInfoRaw_slippageTotalThisBlock(void* yieldInfoRaw_ptr, int index) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr || index < 0 || static_cast(index) >= yieldInfoRaw->size()) { return 0; } - return (*yieldInfoRaw)[index].slippage_total_this_block; + return (*yieldInfoRaw)[index].slippageTotalThisBlock; DEBUG_END() } uint64_t PEYA_YieldInfoRaw_lockedCoinsThisBlock(void* yieldInfoRaw_ptr, int index) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr || index < 0 || static_cast(index) >= yieldInfoRaw->size()) { return 0; } - return (*yieldInfoRaw)[index].locked_coins_this_block; + return (*yieldInfoRaw)[index].lockedCoinsThisBlock; DEBUG_END() } uint64_t PEYA_YieldInfoRaw_lockedCoinsTally(void* yieldInfoRaw_ptr, int index) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr || index < 0 || static_cast(index) >= yieldInfoRaw->size()) { return 0; } - return (*yieldInfoRaw)[index].locked_coins_tally; + return (*yieldInfoRaw)[index].lockedCoinsTally; DEBUG_END() } uint8_t PEYA_YieldInfoRaw_networkHealthPercentage(void* yieldInfoRaw_ptr, int index) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); if (yieldInfoRaw == nullptr || index < 0 || static_cast(index) >= yieldInfoRaw->size()) { return 0; } - return (*yieldInfoRaw)[index].network_health_percentage; + return (*yieldInfoRaw)[index].networkHealthPercentage; DEBUG_END() } void PEYA_YieldInfoRaw_free(void* yieldInfoRaw_ptr) { DEBUG_START() - auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); + auto *yieldInfoRaw = reinterpret_cast*>(yieldInfoRaw_ptr); delete yieldInfoRaw; DEBUG_END() }