Skip to content

Instantly share code, notes, and snippets.

@dexX7
Created February 4, 2016 12:20
Show Gist options
  • Save dexX7/2bcab21304f034dcb307 to your computer and use it in GitHub Desktop.
Save dexX7/2bcab21304f034dcb307 to your computer and use it in GitHub Desktop.
bool mastercore::BalanceCreate(const std::string& destination, uint32_t propertyId, int64_t amount)
{
return update_tally_map(destination, propertyId, amount, BALANCE);
}
bool mastercore::BalanceDestroy(const std::string& destination, uint32_t propertyId, int64_t amount)
{
return update_tally_map(destination, propertyId, -amount, BALANCE);
}
bool mastercore::BalanceRestore(const std::string& destination, uint32_t propertyId, int64_t amount, TallyType ttype)
{
return update_tally_map(destination, propertyId, amount, ttype);
}
bool mastercore::BalanceTransfer(const std::string& source, const std::string& destination, uint32_t propertyId, int64_t amount)
{
return update_tally_map(source, propertyId, -amount, BALANCE)
&& update_tally_map(destination, propertyId, amount, BALANCE);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment