mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 23:31:32 +02:00
MoneroSyncResult does not use pointers
This commit is contained in:
@@ -475,12 +475,8 @@ namespace monero {
|
||||
|
||||
// sync wallet
|
||||
wallet2Listener->onSyncStart(syncStartHeight, listener);
|
||||
|
||||
|
||||
MoneroSyncResult result;
|
||||
result.numBlocksFetched = shared_ptr<uint64_t>(new uint64_t());
|
||||
result.receivedMoney = shared_ptr<bool>(new bool());
|
||||
wallet2->refresh(wallet2->is_trusted_daemon(), syncStartHeight, *result.numBlocksFetched, *result.receivedMoney, true);
|
||||
wallet2->refresh(wallet2->is_trusted_daemon(), syncStartHeight, result.numBlocksFetched, result.receivedMoney, true);
|
||||
wallet2Listener->onSyncEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ namespace monero {
|
||||
* Models a result of syncing a wallet.
|
||||
*/
|
||||
struct MoneroSyncResult {
|
||||
shared_ptr<uint64_t> numBlocksFetched;
|
||||
shared_ptr<bool> receivedMoney;
|
||||
uint64_t numBlocksFetched;
|
||||
bool receivedMoney;
|
||||
MoneroSyncResult() {}
|
||||
MoneroSyncResult(const shared_ptr<uint64_t> numBlocksFetched, const shared_ptr<bool> receivedMoney) : numBlocksFetched(numBlocksFetched), receivedMoney(receivedMoney) {}
|
||||
MoneroSyncResult(const uint64_t numBlocksFetched, const bool receivedMoney) : numBlocksFetched(numBlocksFetched), receivedMoney(receivedMoney) {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user