MoneroSyncResult does not use pointers

This commit is contained in:
woodser
2019-06-04 11:09:46 -04:00
parent ce0179d1a9
commit 377d9b4eb5
2 changed files with 4 additions and 8 deletions
+1 -5
View File
@@ -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;
}
+3 -3
View File
@@ -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) {}
};
/**