Updates from BitShares FC #22
2 changed files with 4 additions and 1 deletions
|
|
@ -261,6 +261,7 @@ namespace fc {
|
|||
template<typename Stream> inline void unpack( Stream& s, std::vector<char>& value, uint32_t _max_depth ) {
|
||||
FC_ASSERT( _max_depth > 0 );
|
||||
unsigned_int size; fc::raw::unpack( s, size, _max_depth - 1 );
|
||||
FC_ASSERT( size.value < MAX_ARRAY_ALLOC_SIZE );
|
||||
value.resize(size.value);
|
||||
if( value.size() )
|
||||
s.read( value.data(), value.size() );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#pragma once
|
||||
#pragma once
|
||||
#include <fc/config.hpp>
|
||||
#include <fc/container/flat_fwd.hpp>
|
||||
#include <fc/container/deque_fwd.hpp>
|
||||
|
|
@ -12,6 +12,8 @@
|
|||
#include <unordered_map>
|
||||
#include <set>
|
||||
|
||||
#define MAX_ARRAY_ALLOC_SIZE (1024*1024*10)
|
||||
|
||||
namespace fc {
|
||||
class time_point;
|
||||
class time_point_sec;
|
||||
|
|
|
|||
Loading…
Reference in a new issue