mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated fift + bugfixes
This commit is contained in:
parent
090e0c16eb
commit
ceaed40ac4
28 changed files with 530 additions and 108 deletions
|
@ -85,6 +85,10 @@ class CellBuilder : public td::CntObject {
|
|||
return idx < refs_cnt ? refs[idx] : Ref<Cell>{};
|
||||
}
|
||||
void reset();
|
||||
bool reset_bool() {
|
||||
reset();
|
||||
return true;
|
||||
}
|
||||
CellBuilder& operator=(const CellBuilder&);
|
||||
CellBuilder& operator=(CellBuilder&&);
|
||||
CellBuilder& store_bytes(const char* str, std::size_t len);
|
||||
|
|
|
@ -218,6 +218,17 @@ unsigned CellSlice::get_level() const {
|
|||
return l;
|
||||
}
|
||||
|
||||
Ref<Cell> CellSlice::get_base_cell() const {
|
||||
if (cell.is_null()) {
|
||||
return {};
|
||||
}
|
||||
auto res = cell->virtualize(virt);
|
||||
if (!tree_node.empty()) {
|
||||
res = UsageCell::create(std::move(res), tree_node);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CellSlice::advance(unsigned bits) {
|
||||
if (have(bits)) {
|
||||
bits_st += bits;
|
||||
|
|
|
@ -137,6 +137,7 @@ class CellSlice : public td::CntObject {
|
|||
}
|
||||
unsigned get_cell_level() const;
|
||||
unsigned get_level() const;
|
||||
Ref<Cell> get_base_cell() const; // be careful with this one!
|
||||
int fetch_octet();
|
||||
int prefetch_octet() const;
|
||||
unsigned long long prefetch_ulong_top(unsigned& bits) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue