summaryrefslogtreecommitdiff
path: root/libbridge/src/main/cpp/wallet2_api_c.cpp
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 10:49:27 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-01-03 10:49:27 +0100
commit8535822d464b3c11d7b2347287cb28318e41da1d (patch)
tree4a0a3133aea82ba0bd097a5f1965389148910c72 /libbridge/src/main/cpp/wallet2_api_c.cpp
parent4a431efd3aba2a2d66400ebd0c0618678de782d4 (diff)
MONERO_Wallet_seed add seed_offset
MONERO_Wallet_daemonBlockChainHeight_runThread add sleep()
Diffstat (limited to 'libbridge/src/main/cpp/wallet2_api_c.cpp')
-rw-r--r--libbridge/src/main/cpp/wallet2_api_c.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbridge/src/main/cpp/wallet2_api_c.cpp b/libbridge/src/main/cpp/wallet2_api_c.cpp
index 83bb128..ce9c210 100644
--- a/libbridge/src/main/cpp/wallet2_api_c.cpp
+++ b/libbridge/src/main/cpp/wallet2_api_c.cpp
@@ -693,9 +693,9 @@ bool MONERO_DeviceProgress_indeterminate(void* deviceProgress_ptr) {
// Wallet
-const char* MONERO_Wallet_seed(void* wallet_ptr) {
+const char* MONERO_Wallet_seed(void* wallet_ptr, const char* seed_offset) {
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
- std::string str = wallet->seed();
+ std::string str = wallet->seed(std::string(seed_offset));
const std::string::size_type size = str.size();
char *buffer = new char[size + 1]; //we need extra char for NUL
memcpy(buffer, str.c_str(), size + 1);
@@ -963,6 +963,7 @@ void MONERO_Wallet_daemonBlockChainHeight_runThread(void* wallet_ptr) {
while (true) {
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
daemonBlockChainHeight_cached = wallet->daemonBlockChainHeight();
+ sleep(daemonBlockChainHeight_cahceSleepTime);
std::cout << "MONERO: TICK: MONERO_Wallet_daemonBlockChainHeight_runThread: " << daemonBlockChainHeight_cached << std::endl;
}
}