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

pow-testgiver support

This commit is contained in:
ton 2020-07-06 17:07:20 +03:00
parent dbde9c1c40
commit f064b1047a
257 changed files with 6665 additions and 2608 deletions

View file

@ -40,7 +40,7 @@ class StringBuilder {
}
MutableCSlice as_cslice() {
if (current_ptr_ >= end_ptr_ + reserved_size) {
if (current_ptr_ >= end_ptr_ + RESERVED_SIZE) {
std::abort(); // shouldn't happen
}
*current_ptr_ = 0;
@ -118,7 +118,7 @@ class StringBuilder {
bool error_flag_ = false;
bool use_buffer_ = false;
std::unique_ptr<char[]> buffer_;
static constexpr size_t reserved_size = 30;
static constexpr size_t RESERVED_SIZE = 30;
StringBuilder &on_error() {
error_flag_ = true;
@ -129,7 +129,7 @@ class StringBuilder {
if (end_ptr_ > current_ptr_) {
return true;
}
return reserve_inner(reserved_size);
return reserve_inner(RESERVED_SIZE);
}
bool reserve(size_t size) {
if (end_ptr_ > current_ptr_ && static_cast<size_t>(end_ptr_ - current_ptr_) >= size) {