Skip to content

Commit

Permalink
Modify type alias of function bytecode (clarity)
Browse files Browse the repository at this point in the history
Ammended to reflect type name usage in files associated
with runner interface

Further ammended because of alias scope

Signed-off-by: Michael Maurer <[email protected]>
  • Loading branch information
maurermi committed Apr 5, 2023
1 parent a260bd0 commit 40c92fd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/3pc/agent/runners/evm/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
namespace cbdc::threepc::agent::runner {
evm_runner::evm_runner(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
run_callback_type result_callback,
Expand Down
2 changes: 1 addition & 1 deletion src/3pc/agent/runners/evm/impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace cbdc::threepc::agent::runner {
/// \copydoc interface::interface
evm_runner(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
run_callback_type result_callback,
Expand Down
2 changes: 1 addition & 1 deletion src/3pc/agent/runners/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace cbdc::threepc::agent::runner {
interface::interface(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
run_callback_type result_callback,
Expand Down
12 changes: 8 additions & 4 deletions src/3pc/agent/runners/interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#include <memory>

namespace cbdc::threepc::agent::runner {
// type alias for function bytecode
using bytecode_type = cbdc::buffer;


/// Interface for a contract runner. Subclasses should implement
/// application logic to enforce specific transaction semantics.
class interface {
Expand Down Expand Up @@ -69,7 +73,7 @@ namespace cbdc::threepc::agent::runner {
using factory_type = std::function<std::unique_ptr<interface>(
std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
runner::interface::run_callback_type result_callback,
Expand All @@ -95,7 +99,7 @@ namespace cbdc::threepc::agent::runner {
/// runner instance.
interface(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
run_callback_type result_callback,
Expand All @@ -122,7 +126,7 @@ namespace cbdc::threepc::agent::runner {
private:
std::shared_ptr<logging::log> m_log;
const cbdc::threepc::config& m_cfg;
runtime_locking_shard::value_type m_function;
bytecode_type m_function;
parameter_type m_param;
bool m_is_readonly_run;
run_callback_type m_result_callback;
Expand All @@ -143,7 +147,7 @@ namespace cbdc::threepc::agent::runner {
static auto
create(std::shared_ptr<logging::log> logger,
cbdc::threepc::config cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool is_readonly_run,
runner::interface::run_callback_type result_callback,
Expand Down
2 changes: 1 addition & 1 deletion src/3pc/agent/runners/lua/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace cbdc::threepc::agent::runner {

lua_runner::lua_runner(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool dry_run,
run_callback_type result_callback,
Expand Down
2 changes: 1 addition & 1 deletion src/3pc/agent/runners/lua/impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace cbdc::threepc::agent::runner {
/// \copydoc interface::interface()
lua_runner(std::shared_ptr<logging::log> logger,
const cbdc::threepc::config& cfg,
runtime_locking_shard::value_type function,
bytecode_type function,
parameter_type param,
bool dry_run,
run_callback_type result_callback,
Expand Down

0 comments on commit 40c92fd

Please sign in to comment.