Skip to content

Commit

Permalink
Merge pull request fioprotocol#112 from fioprotocol/migr/part2b
Browse files Browse the repository at this point in the history
[FIP-1.b] Contracts Part 2: Remove old data from index table (FIO fioprotocol#185)(Old PR fioprotocol#9)
  • Loading branch information
0xCasey authored Feb 1, 2021
2 parents fb9a9f1 + 9ceacae commit 9003981
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 401 deletions.
24 changes: 1 addition & 23 deletions contracts/fio.address/fio.address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ namespace fioio {
eosiosystem::producers_table producers;
eosiosystem::locked_tokens_table lockedTokensTable;
config appConfig;
recordobt_table recordObtTable; //TEMP FOR XFERADDRESS
fiorequest_contexts_table fiorequestContextsTable; //TEMP FOR XFERADDRESS

public:
using contract::contract;
Expand All @@ -46,9 +44,7 @@ namespace fioio {
voters(SYSTEMACCOUNT, SYSTEMACCOUNT.value),
topprods(SYSTEMACCOUNT, SYSTEMACCOUNT.value),
producers(SYSTEMACCOUNT, SYSTEMACCOUNT.value),
lockedTokensTable(SYSTEMACCOUNT,SYSTEMACCOUNT.value),
recordObtTable(REQOBTACCOUNT, REQOBTACCOUNT.value), //TEMP FOR XFERADDRESS
fiorequestContextsTable(REQOBTACCOUNT, REQOBTACCOUNT.value){ //TEMP FOR XFERADDRESS
lockedTokensTable(SYSTEMACCOUNT,SYSTEMACCOUNT.value){
configs_singleton configsSingleton(FeeContract, FeeContract.value);
appConfig = configsSingleton.get_or_default(config());
}
Expand Down Expand Up @@ -1391,24 +1387,6 @@ namespace fioio {
fio_403_assert(fioname_iter->owner_account == actor.value, ErrorSignature);
const uint128_t endpoint_hash = string_to_uint128_hash(TRANSFER_ADDRESS_ENDPOINT);

//TEMP
auto obtbyname = recordObtTable.get_index<"bypayee"_n>();
auto name_iter = obtbyname.find(nameHash);
check(name_iter == obtbyname.end(), "Transfering a FIO address is currently disabled for some fio.addresses");

auto obtbyname2 = recordObtTable.get_index<"bypayer"_n>();
auto name_iter2 = obtbyname2.find(nameHash);
check(name_iter2 == obtbyname2.end(), "Transfering a FIO address is currently disabled for some fio.addresses");

auto reqbyname = fiorequestContextsTable.get_index<"byreceiver"_n>();
auto name_iter3 = reqbyname.find(nameHash);
check(name_iter3 == reqbyname.end(), "Transfering a FIO address is currently disabled for some fio.addresses");

auto reqbyname2 = fiorequestContextsTable.get_index<"byoriginator"_n>();
auto name_iter4 = reqbyname2.find(nameHash);
check(name_iter4 == reqbyname2.end(), "Transfering a FIO address is currently disabled for some fio.addresses");
//TEMP

auto fees_by_endpoint = fiofees.get_index<"byendpoint"_n>();
auto fee_iter = fees_by_endpoint.find(endpoint_hash);
fio_400_assert(fee_iter != fees_by_endpoint.end(), "endpoint_name", TRANSFER_ADDRESS_ENDPOINT,
Expand Down
Loading

0 comments on commit 9003981

Please sign in to comment.