1

how and when to useall these keywords and what they actually means? and what is the difference in these 2 statement given below

auto itr = loan_table.get(loan_id);
auto itr1 = loan_table.find(loan_id);

main code

void mainloan::checkperiod(uint64_t loan_id, uint64_t instl_check, uint64_t delay){
  require_auth(get_self());
  auto itr = loan_table.get(loan_id);
  auto itr1 = loan_table.find(loan_id);

  eosio::transaction t{};
  eosio::print("  second txn created.    ");
  t.actions.emplace_back(
      permission_level(get_self(), "active"_n),
      get_self(),
      "checkpayment"_n,
      std::make_tuple(loan_id, instl_check));
  eosio::print("  |||||action inserted in txn w delay set.   ");
 t.delay_sec = delay; //7 days=>1 installment  //30*24*60*60;   //delay in seconds => 1 month in sec
 eosio::print(" ||delay set.    ");
 t.send(now()+delay, get_self() /*, false */);
 eosio::print(" ||tnx sent.   ");

}
| improve this question | | | | |
0

These are part of the EOS multi-index. Latest documentation: https://eosio.github.io/eosio.cdt/1.6.0/group__multiindex.html

get()

find()

end()

raw()

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.