16
16
#include < memory>
17
17
18
18
namespace cbdc ::threepc::agent::runner {
19
+ // type alias for function bytecode
20
+ using bytecode_type = cbdc::buffer;
21
+
22
+
19
23
// / Interface for a contract runner. Subclasses should implement
20
24
// / application logic to enforce specific transaction semantics.
21
25
class interface {
@@ -69,7 +73,7 @@ namespace cbdc::threepc::agent::runner {
69
73
using factory_type = std::function<std::unique_ptr<interface>(
70
74
std::shared_ptr<logging::log> logger,
71
75
const cbdc::threepc::config& cfg,
72
- runtime_locking_shard::value_type function,
76
+ bytecode_type function,
73
77
parameter_type param,
74
78
bool is_readonly_run,
75
79
runner::interface::run_callback_type result_callback,
@@ -95,7 +99,7 @@ namespace cbdc::threepc::agent::runner {
95
99
// / runner instance.
96
100
interface (std::shared_ptr<logging::log> logger,
97
101
const cbdc::threepc::config& cfg,
98
- runtime_locking_shard::value_type function,
102
+ bytecode_type function,
99
103
parameter_type param,
100
104
bool is_readonly_run,
101
105
run_callback_type result_callback,
@@ -122,7 +126,7 @@ namespace cbdc::threepc::agent::runner {
122
126
private:
123
127
std::shared_ptr<logging::log> m_log;
124
128
const cbdc::threepc::config& m_cfg;
125
- runtime_locking_shard::value_type m_function;
129
+ bytecode_type m_function;
126
130
parameter_type m_param;
127
131
bool m_is_readonly_run;
128
132
run_callback_type m_result_callback;
@@ -143,7 +147,7 @@ namespace cbdc::threepc::agent::runner {
143
147
static auto
144
148
create (std::shared_ptr<logging::log> logger,
145
149
cbdc::threepc::config cfg,
146
- runtime_locking_shard::value_type function,
150
+ bytecode_type function,
147
151
parameter_type param,
148
152
bool is_readonly_run,
149
153
runner::interface::run_callback_type result_callback,
0 commit comments