* Parse uidType in table */
| 569 | * Parse uidType in table |
| 570 | */ |
| 571 | static 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 |
no test coverage detected