mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Tonlib improvement fixes (#934)
* 3.6. Fix directory traversal in KeyValueDir * 3.9. Fix buffer_to_hex reversing nibbles * 3.5. Fix error handling at blocks.getBlockHeader * 3.11. Fix query.forget * 3.12. Fix error handling in RemoteRunSmcMethod * 4.1. Delete unused files * 3.10. Use named constants instead hardcoded constants * 3.4. Fix response block header verification * 3.1. Check proof of blocks.getShards response * fix td::buffer_to_hex + test * 3.2. Add proof check for listBlockTransactions response in RunEmulator actor * 3.8. Add proof checking for getLibraries method * fix regression tests * 3.3 Add proof checking for lookupBlock method * Add publishers to proof of getLibrariesWithProof response (#25) * fix missing return, fix requesting mc block * Fix requesting lookupBlock with client mc blk == mc ref block * Fix duplicating lib data in proof and data, add mode 2 for not including the data * Migration of LastBlockStorage with fixed td::buffer_to_hex --------- Co-authored-by: ms <dungeon666master@protonmail.com> Co-authored-by: Marat <98183742+dungeon-master-666@users.noreply.github.com>
This commit is contained in:
parent
69de1cb621
commit
f1592641de
25 changed files with 1000 additions and 854 deletions
|
@ -153,9 +153,9 @@ string buffer_to_hex(Slice buffer) {
|
|||
const char *hex = "0123456789ABCDEF";
|
||||
string res(2 * buffer.size(), '\0');
|
||||
for (std::size_t i = 0; i < buffer.size(); i++) {
|
||||
auto c = buffer.ubegin()[i];
|
||||
res[2 * i] = hex[c & 15];
|
||||
res[2 * i + 1] = hex[c >> 4];
|
||||
unsigned char c = buffer[i];
|
||||
res[2 * i] = hex[c >> 4];
|
||||
res[2 * i + 1] = hex[c & 15];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue