Introduced fallback contract execution (#388)

This commit is contained in:
Chalith Desaman
2023-11-08 10:24:15 +05:30
committed by GitHub
parent bfc38a3c70
commit c3bacabff6
25 changed files with 377 additions and 126 deletions

View File

@@ -219,7 +219,7 @@ namespace read_req
void initialize_execution_context(const user_read_req &read_request, const pthread_t thread_id, sc::execution_context &contract_ctx)
{
contract_ctx.args.hpfs_session_name = "ro_" + std::to_string(thread_id);
contract_ctx.args.readonly = true;
contract_ctx.args.mode = sc::EXECUTION_MODE::READ_REQUEST;
sc::contract_iobufs user_bufs;
user_bufs.inputs.push_back(read_request.content);
contract_ctx.args.userbufs.try_emplace(read_request.pubkey, std::move(user_bufs));