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

updated smartcontracts

- updated smartcontracts
- updated fullnode database layout
- fixed memory leak in blockchain-explorer
- updated tonlib
This commit is contained in:
ton 2019-10-23 17:43:50 +04:00
parent 9c9248a9ae
commit c860ce3d1e
104 changed files with 7309 additions and 1335 deletions

View file

@ -20,20 +20,9 @@
#include "td/utils/misc.h"
#include "vm/cellslice.h"
namespace tonlib {
int VERBOSITY_NAME(tonlib_query) = VERBOSITY_NAME(INFO);
int VERBOSITY_NAME(last_block) = VERBOSITY_NAME(INFO);
int VERBOSITY_NAME(lite_server) = VERBOSITY_NAME(INFO);
int VERBOSITY_NAME(tonlib_query) = VERBOSITY_NAME(DEBUG);
int VERBOSITY_NAME(last_block) = VERBOSITY_NAME(DEBUG);
int VERBOSITY_NAME(last_config) = VERBOSITY_NAME(DEBUG);
int VERBOSITY_NAME(lite_server) = VERBOSITY_NAME(DEBUG);
td::Result<td::Ref<vm::CellSlice>> binary_bitstring_to_cellslice(td::Slice literal) {
unsigned char buff[128];
if (!begins_with(literal, "b{") || !ends_with(literal, "}")) {
return td::Status::Error("Invalid binary bitstring constant");
}
int bits =
(int)td::bitstring::parse_bitstring_binary_literal(buff, sizeof(buff), literal.begin() + 2, literal.end() - 1);
if (bits < 0) {
return td::Status::Error("Invalid binary bitstring constant");
}
return td::Ref<vm::CellSlice>{true, vm::CellBuilder().store_bits(td::ConstBitPtr{buff}, bits).finalize()};
}
} // namespace tonlib