MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / ParseUidTypeInTable

Function ParseUidTypeInTable

src/vm/luavm/lmylib.cpp:571–584  ·  view source on GitHub ↗

* Parse uidType in table */

Source from the content-addressed store, hash-verified

569 * Parse uidType in table
570 */
571static bool ParseUidTypeInTable(lua_State *L, const char *pKey, AccountType &uidType) {
572 lua_Integer uidTypeInt;
573 if (!(getIntegerInTable(L, pKey, uidTypeInt))) {
574 LogPrint(BCLog::LUAVM, "ParseUidTypeInTable(), get %s failed\n", pKey);
575 return false;
576 }
577
578 if (uidTypeInt != AccountType::REGID && uidTypeInt != AccountType::BASE58ADDR) {
579 LogPrint(BCLog::LUAVM, "ParseUidTypeInTable(), invalid accountType: %d\n", uidTypeInt);
580 return false;
581 }
582 uidType = (AccountType)uidTypeInt;
583 return true;
584}
585
586/**
587 * Parse uid in table

Callers 2

ExGetAccountAssetFuncFunction · 0.85

Calls 1

getIntegerInTableFunction · 0.85

Tested by

no test coverage detected