提交 913c8825 编写于 作者: B Bart Wyatt

remove now-stale boost bug work-around. Cap the reserve on...

remove now-stale boost bug work-around.  Cap the reserve on get_scheduled_transactions to something "reasonable"
上级 69b571ad
......@@ -477,7 +477,6 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
}
db.modify( obj, [&]( auto& o ) {
o.value.resize( 0 );
o.value.resize( buffer_size );
memcpy( o.value.data(), buffer, buffer_size );
o.payer = payer;
......
......@@ -1282,7 +1282,9 @@ vector<transaction_id_type> controller::get_scheduled_transactions() const {
const auto& idx = db().get_index<generated_transaction_multi_index,by_delay>();
vector<transaction_id_type> result;
result.reserve(idx.size());
static const size_t max_reserve = 64;
result.reserve(std::min(idx.size(), max_reserve));
auto itr = idx.begin();
while( itr != idx.end() && itr->delay_until <= pending_block_time() ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册