Fix Win64 monero_c build for raw yield API
This commit is contained in:
+1
-1
Submodule peya updated: cf5969b5dd...a0162b4205
@@ -6,7 +6,6 @@
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#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<Monero::WalletImpl*>(wallet_ptr);
|
||||
auto *result = new std::vector<cryptonote::yield_block_info>();
|
||||
auto *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||
auto *result = new std::vector<Monero::YieldInfoRawRow>();
|
||||
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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
if (yieldInfoRaw == nullptr || index < 0 || static_cast<size_t>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
if (yieldInfoRaw == nullptr || index < 0 || static_cast<size_t>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
if (yieldInfoRaw == nullptr || index < 0 || static_cast<size_t>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
if (yieldInfoRaw == nullptr || index < 0 || static_cast<size_t>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
if (yieldInfoRaw == nullptr || index < 0 || static_cast<size_t>(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<std::vector<cryptonote::yield_block_info>*>(yieldInfoRaw_ptr);
|
||||
auto *yieldInfoRaw = reinterpret_cast<std::vector<Monero::YieldInfoRawRow>*>(yieldInfoRaw_ptr);
|
||||
delete yieldInfoRaw;
|
||||
DEBUG_END()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user