1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Extra currencies (#1122)

* Support extra currencies in tonlib, blockchain-explorer, getAccountPrunned

* Fix dict_combine_with with non-zero mode
This commit is contained in:
SpyCheese 2024-10-01 10:22:49 +03:00 committed by GitHub
parent 257cd8cd9c
commit f94d1bee0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 182 additions and 57 deletions

View file

@ -1779,7 +1779,7 @@ Ref<Cell> DictionaryFixed::dict_combine_with(Ref<Cell> dict1, Ref<Cell> dict2, t
int mode, int skip1, int skip2) const {
if (dict1.is_null()) {
assert(!skip2);
if ((mode & 1) && dict2.is_null()) {
if ((mode & 1) && dict2.not_null()) {
throw CombineError{};
}
return dict2;
@ -1854,11 +1854,11 @@ Ref<Cell> DictionaryFixed::dict_combine_with(Ref<Cell> dict1, Ref<Cell> dict2, t
key_buffer[-1] = 0;
// combine left subtrees
auto c1 = dict_combine_with(label1.remainder->prefetch_ref(0), label2.remainder->prefetch_ref(0), key_buffer,
n - c - 1, total_key_len, combine_func);
n - c - 1, total_key_len, combine_func, mode);
key_buffer[-1] = 1;
// combine right subtrees
auto c2 = dict_combine_with(label1.remainder->prefetch_ref(1), label2.remainder->prefetch_ref(1), key_buffer,
n - c - 1, total_key_len, combine_func);
n - c - 1, total_key_len, combine_func, mode);
label1.remainder.clear();
label2.remainder.clear();
// c1 and c2 are merged left and right children of dict1 and dict2