Skip to content

Commit

Permalink
Add GetNextPropertyId function
Browse files Browse the repository at this point in the history
  • Loading branch information
zathras-crypto committed Mar 26, 2015
1 parent d6a48bf commit 2c137f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mastercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,15 @@ const double available_reward=all_reward * part_available;
return devmsc;
}

uint32_t mastercore::GetNextPropertyId(bool maineco)
{
if(maineco) {
return _my_sps->peekNextSPID(1);
} else {
return _my_sps->peekNextSPID(2);
}
}

// TODO: optimize efficiency -- iterate only over wallet's addresses in the future
// NOTE: if we loop over wallet addresses we miss tokens that may be in change addresses (since mapAddressBook does not
// include change addresses). with current transaction load, about 0.02 - 0.06 seconds is spent on this function
Expand Down
1 change: 1 addition & 0 deletions src/mastercore.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ uint256 send_INTERNAL_1packet(const string &FromAddress, const string &ToAddress

bool isTestEcosystemProperty(unsigned int property);
bool isMainEcosystemProperty(unsigned int property);
uint32_t GetNextPropertyId(bool maineco);

CMPTally *getTally(const string & address);

Expand Down

0 comments on commit 2c137f3

Please sign in to comment.