Skip to content

Commit 38fa499

Browse files
committed
Modify type alias of function bytecode (clarity)
Ammended to reflect type name usage in files associated with runner interface Signed-off-by: Michael Maurer <[email protected]>
1 parent a260bd0 commit 38fa499

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

src/3pc/agent/runners/evm/impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace cbdc::threepc::agent::runner {
2020
evm_runner::evm_runner(std::shared_ptr<logging::log> logger,
2121
const cbdc::threepc::config& cfg,
22-
runtime_locking_shard::value_type function,
22+
bytecode_type function,
2323
parameter_type param,
2424
bool is_readonly_run,
2525
run_callback_type result_callback,

src/3pc/agent/runners/evm/impl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace cbdc::threepc::agent::runner {
4949
/// \copydoc interface::interface
5050
evm_runner(std::shared_ptr<logging::log> logger,
5151
const cbdc::threepc::config& cfg,
52-
runtime_locking_shard::value_type function,
52+
bytecode_type function,
5353
parameter_type param,
5454
bool is_readonly_run,
5555
run_callback_type result_callback,

src/3pc/agent/runners/interface.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace cbdc::threepc::agent::runner {
99
interface::interface(std::shared_ptr<logging::log> logger,
1010
const cbdc::threepc::config& cfg,
11-
runtime_locking_shard::value_type function,
11+
bytecode_type function,
1212
parameter_type param,
1313
bool is_readonly_run,
1414
run_callback_type result_callback,

src/3pc/agent/runners/interface.hpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace cbdc::threepc::agent::runner {
6969
using factory_type = std::function<std::unique_ptr<interface>(
7070
std::shared_ptr<logging::log> logger,
7171
const cbdc::threepc::config& cfg,
72-
runtime_locking_shard::value_type function,
72+
bytecode_type function,
7373
parameter_type param,
7474
bool is_readonly_run,
7575
runner::interface::run_callback_type result_callback,
@@ -78,6 +78,10 @@ namespace cbdc::threepc::agent::runner {
7878
std::shared_ptr<thread_pool> t_pool,
7979
ticket_number_type ticket_number)>;
8080

81+
82+
// type alias for function bytecode
83+
using bytecode_type = cbdc::buffer;
84+
8185
/// Constructor.
8286
/// \param logger log instance.
8387
/// \param cfg config reference.
@@ -95,7 +99,7 @@ namespace cbdc::threepc::agent::runner {
9599
/// runner instance.
96100
interface(std::shared_ptr<logging::log> logger,
97101
const cbdc::threepc::config& cfg,
98-
runtime_locking_shard::value_type function,
102+
bytecode_type function,
99103
parameter_type param,
100104
bool is_readonly_run,
101105
run_callback_type result_callback,
@@ -122,7 +126,7 @@ namespace cbdc::threepc::agent::runner {
122126
private:
123127
std::shared_ptr<logging::log> m_log;
124128
const cbdc::threepc::config& m_cfg;
125-
runtime_locking_shard::value_type m_function;
129+
bytecode_type m_function;
126130
parameter_type m_param;
127131
bool m_is_readonly_run;
128132
run_callback_type m_result_callback;
@@ -143,7 +147,7 @@ namespace cbdc::threepc::agent::runner {
143147
static auto
144148
create(std::shared_ptr<logging::log> logger,
145149
cbdc::threepc::config cfg,
146-
runtime_locking_shard::value_type function,
150+
bytecode_type function,
147151
parameter_type param,
148152
bool is_readonly_run,
149153
runner::interface::run_callback_type result_callback,

src/3pc/agent/runners/lua/impl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace cbdc::threepc::agent::runner {
2222

2323
lua_runner::lua_runner(std::shared_ptr<logging::log> logger,
2424
const cbdc::threepc::config& cfg,
25-
runtime_locking_shard::value_type function,
25+
bytecode_type function,
2626
parameter_type param,
2727
bool dry_run,
2828
run_callback_type result_callback,

src/3pc/agent/runners/lua/impl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace cbdc::threepc::agent::runner {
2323
/// \copydoc interface::interface()
2424
lua_runner(std::shared_ptr<logging::log> logger,
2525
const cbdc::threepc::config& cfg,
26-
runtime_locking_shard::value_type function,
26+
bytecode_type function,
2727
parameter_type param,
2828
bool dry_run,
2929
run_callback_type result_callback,

0 commit comments

Comments
 (0)