30template <
typename P,
typename T>
37template <
typename P,
typename T>
50template <
typename ST,
typename T>
58template <
typename ST,
typename T>
60 const std::vector<std::shared_ptr<T>>& v) {
63 SYS_ASSERT(!!x, sysio::chain::plugin_exception,
"null inside container");
69template <
typename ST,
typename P,
typename T>
71 const std::vector<T>& v) {
73 for (
const auto& x : v) {
79template <
typename ST,
typename T>
83 for (
auto& x : obj.
obj)
93 b |= ((val > 0) << 7);
94 ds.write((
char*)&b, 1);
102 ds.write(&v.front(), v.size());
105template <
typename ST>
112template <
typename ST,
typename T>
117template <
typename ST,
typename P,
typename T>
122template <
typename ST,
typename First,
typename Second>
129template <
typename ST>
138template <
typename ST>
155template <
typename ST>
165template <
typename ST>
175template <
typename ST>
189template <
typename ST,
typename T>
194template <
typename ST>
197 memcpy(&i, &obj,
sizeof(i));
201template <
typename ST>
204 memcpy(&i, &obj,
sizeof(i));
208template <
typename ST>
210 auto rev = [&](__uint128_t x) {
211 char* ch =
reinterpret_cast<char*
>(&x);
212 std::reverse(ch, ch +
sizeof(x));
219template <
typename ST,
typename T>
232template <
typename ST>
239template <
typename ST>
246template <
typename ST>
253template <
typename ST>
260template <
typename ST>
267template <
typename ST>
275template <
typename ST>
283template <
typename ST>
292template <
typename ST>
316template <
typename ST>
333template <
typename ST>
347template <
typename ST>
359template <
typename ST>
369template <
typename ST>
376template <
typename ST>
383template <
typename ST>
390template <
typename ST>
398template <
typename ST>
405template <
typename ST>
414template <
typename ST>
419 if (obj.
obj.parent._id) {
421 const auto* parent = index.find(obj.
obj.parent);
423 auto undo = index.last_undo_session();
424 auto it = std::find_if(undo.removed_values.begin(), undo.removed_values.end(),
425 [&](
auto& x) { return x.id._id == obj.obj.parent; });
426 SYS_ASSERT(it != undo.removed_values.end(), sysio::chain::plugin_exception,
427 "can not find parent of permission_object");
439template <
typename ST>
450template <
typename ST>
454 "accepted_block sent while resource_limits_object in pending state");
463template <
typename ST>
473template <
typename ST>
486template <
typename ST>
492 obj.
obj.average_block_net_usage)));
494 obj.
obj.average_block_cpu_usage)));
503template <
typename ST>
512template <
typename ST>
527template <
typename ST>
543template <
typename ST>
552template <
typename ST>
565template <
typename ST>
572inline std::optional<uint64_t>
cap_error_code(
const std::optional<uint64_t>& error_code) {
573 std::optional<uint64_t> result;
580 if (*error_code >= upper_limit) {
581 result = upper_limit;
589template <
typename ST>
596 if (obj.
obj.receipt) {
609 std::optional<std::string> e;
610 if (obj.
obj.except) {
612 e = obj.
obj.except->to_string();
624template <
typename ST>
628 auto& trace = *obj.
obj.trace;
629 bool debug_mode = obj.
context.second;
648 as_type<std::vector<sysio::chain::action_trace>>(trace.action_traces));
651 if (trace.account_ram_delta) {
656 std::optional<std::string> e;
659 e = trace.except->to_string();
667 if (trace.failed_dtrx_trace) {
671 std::pair<uint8_t, bool>
context = std::make_pair(stat, debug_mode);
678 bool include_partial = obj.
obj.partial && !trace.failed_dtrx_trace;
680 if (include_partial) {
681 auto& partial = *obj.
obj.partial;
697template <
typename ST>
706template <
typename ST>
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
const generic_index< MultiIndexType > & get_index() const
The table_id_object class tracks the mapping of (scope, code, table) to an opaque identifier.
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
static const Segment ds(Segment::ds)
void pack(Stream &s, const std::deque< T > &value)
datastream< ST > & history_context_serialize_container(datastream< ST > &ds, const chainbase::database &db, const P &context, const std::vector< T > &v)
void history_pack_varuint64(datastream< ST > &ds, uint64_t val)
const T & as_type(const T &x)
std::optional< uint64_t > cap_error_code(const std::optional< uint64_t > &error_code)
void history_pack_big_bytes(datastream< ST > &ds, const sysio::chain::bytes &v)
datastream< ST > & history_serialize_container(datastream< ST > &ds, const chainbase::database &db, const T &v)
datastream< ST > & operator<<(datastream< ST > &s, const sysio::chain::may_not_exist< T > &v)
void serialize_secondary_index_data(datastream< ST > &ds, const T &obj)
datastream< ST > & serialize_secondary_index(datastream< ST > &ds, const sysio::chain::table_id_object &context, const T &obj)
checksum_type digest_type
std::array< uint128_t, 2 > key256_t
chainbase::shared_multi_index_container< permission_object, indexed_by< ordered_unique< tag< by_id >, member< permission_object, permission_object::id_type, &permission_object::id > >, ordered_unique< tag< by_parent >, composite_key< permission_object, member< permission_object, permission_object::id_type, &permission_object::parent >, member< permission_object, permission_object::id_type, &permission_object::id > > >, ordered_unique< tag< by_owner >, composite_key< permission_object, member< permission_object, account_name, &permission_object::owner >, member< permission_object, permission_name, &permission_object::name > > >, ordered_unique< tag< by_name >, composite_key< permission_object, member< permission_object, permission_name, &permission_object::name >, member< permission_object, permission_object::id_type, &permission_object::id > > > > > permission_index
boost::interprocess::vector< T, allocator< T > > shared_vector
#define T(meth, val, expected)
sysio::client::http::http_context context
history_context_wrapper< std::decay_t< P >, std::decay_t< T > > make_history_context_wrapper(const chainbase::database &db, const P &context, const T &obj)
history_serial_wrapper< std::decay_t< T > > make_history_serial_wrapper(const chainbase::database &db, const T &obj)
unsigned __int64 uint64_t
const chainbase::database & db
const chainbase::database & db
std::optional< block_position > prev_block
std::optional< bytes > traces
block_position last_irreversible
std::optional< bytes > deltas
std::optional< block_position > this_block
std::optional< bytes > block
memcpy((char *) pInfo->slotDescription, s, l)