From 2c137f388797c8cfe363e9f8d5993a134b595d9e Mon Sep 17 00:00:00 2001 From: zathras-crypto Date: Wed, 25 Mar 2015 18:44:45 -0700 Subject: [PATCH] Add GetNextPropertyId function --- src/mastercore.cpp | 9 +++++++++ src/mastercore.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/mastercore.cpp b/src/mastercore.cpp index c29051dcb8c85..1754379524344 100644 --- a/src/mastercore.cpp +++ b/src/mastercore.cpp @@ -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 diff --git a/src/mastercore.h b/src/mastercore.h index 6eb7f527de18b..1ac95609dea9d 100644 --- a/src/mastercore.h +++ b/src/mastercore.h @@ -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);