mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
slightly changed block format
- small change in block format - added config in blockchain explorer - bugfixes
This commit is contained in:
parent
7f3a22a217
commit
090e0c16eb
82 changed files with 1852 additions and 391 deletions
|
@ -57,6 +57,11 @@ class Atom;
|
|||
|
||||
using Tuple = td::Cnt<std::vector<StackEntry>>;
|
||||
|
||||
template <typename... Args>
|
||||
Ref<Tuple> make_tuple_ref(Args&&... args) {
|
||||
return td::make_cnt_ref<std::vector<vm::StackEntry>>(std::vector<vm::StackEntry>{std::forward<Args>(args)...});
|
||||
}
|
||||
|
||||
struct from_object_t {};
|
||||
constexpr from_object_t from_object{};
|
||||
|
||||
|
@ -192,6 +197,10 @@ class StackEntry {
|
|||
public:
|
||||
static StackEntry make_list(std::vector<StackEntry>&& elems);
|
||||
static StackEntry make_list(const std::vector<StackEntry>& elems);
|
||||
template <typename T1, typename T2>
|
||||
static StackEntry cons(T1&& x, T2&& y) {
|
||||
return StackEntry{make_tuple_ref(std::forward<T1>(x), std::forward<T2>(y))};
|
||||
}
|
||||
template <typename T>
|
||||
static StackEntry maybe(Ref<T> ref) {
|
||||
if (ref.is_null()) {
|
||||
|
@ -268,11 +277,6 @@ inline void swap(StackEntry& se1, StackEntry& se2) {
|
|||
se1.swap(se2);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
Ref<Tuple> make_tuple_ref(Args&&... args) {
|
||||
return td::make_cnt_ref<std::vector<vm::StackEntry>>(std::vector<vm::StackEntry>{std::forward<Args>(args)...});
|
||||
}
|
||||
|
||||
const StackEntry& tuple_index(const Tuple& tup, unsigned idx);
|
||||
StackEntry tuple_extend_index(const Ref<Tuple>& tup, unsigned idx);
|
||||
unsigned tuple_extend_set_index(Ref<Tuple>& tup, unsigned idx, StackEntry&& value, bool force = false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue