Skip to content

Commit 40c92fd

Browse files
committed
Modify type alias of function bytecode (clarity)
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]>
1 parent a260bd0 commit 40c92fd

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
@@ -16,6 +16,10 @@
1616
#include <memory>
1717

1818
namespace cbdc::threepc::agent::runner {
19+
// type alias for function bytecode
20+
using bytecode_type = cbdc::buffer;
21+
22+
1923
/// Interface for a contract runner. Subclasses should implement
2024
/// application logic to enforce specific transaction semantics.
2125
class interface {
@@ -69,7 +73,7 @@ namespace cbdc::threepc::agent::runner {
6973
using factory_type = std::function<std::unique_ptr<interface>(
7074
std::shared_ptr<logging::log> logger,
7175
const cbdc::threepc::config& cfg,
72-
runtime_locking_shard::value_type function,
76+
bytecode_type function,
7377
parameter_type param,
7478
bool is_readonly_run,
7579
runner::interface::run_callback_type result_callback,
@@ -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)