Skip to content

Commit

Permalink
GH-1251 Add additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jun 22, 2023
1 parent 8fc11f0 commit 8706738
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions libraries/chain/apply_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1094,12 +1094,18 @@ action_name apply_context::get_sender() const {
return action_name();
}


// Context | OC?
//-------------------------------------------------------------------------------
// Building block | baseline, OC for eosio.*
// Applying block | OC unless a producer, OC for eosio.* including producers
// Speculative API trx | baseline, OC for eosio.*
// Speculative P2P trx | baseline, OC for eosio.*
// Compute trx | baseline, OC for eosio.*
// Read only trx | OC
bool apply_context::should_use_eos_vm_oc()const {
return trx_context.is_read_only()
|| receiver.prefix() == config::system_account_name // "eosio"_n
|| (trx_context.explicit_billed_cpu_time && !control.is_producer_node()) // validating/applying block
|| false; // todo: could enable for p2p but may cause spam on producer
|| receiver.prefix() == config::system_account_name // "eosio"_n, all cases use OC
|| (trx_context.explicit_billed_cpu_time && !control.is_producer_node()); // validating/applying block
}


Expand Down

0 comments on commit 8706738

Please sign in to comment.