提交 34a6cd84 编写于 作者: D Daniel Larimer

update max block size, fix performance of...

update max block size, fix performance of chain_controller::head_block_producer, and increase batch sizes for benchmark
上级 b7eaf11c
...@@ -1025,6 +1025,9 @@ block_id_type chain_controller::head_block_id()const { ...@@ -1025,6 +1025,9 @@ block_id_type chain_controller::head_block_id()const {
} }
types::AccountName chain_controller::head_block_producer() const { types::AccountName chain_controller::head_block_producer() const {
auto b = _fork_db.fetch_block(head_block_id());
if( b ) return b->data.producer;
if (auto head_block = fetch_block_by_id(head_block_id())) if (auto head_block = fetch_block_by_id(head_block_id()))
return head_block->producer; return head_block->producer;
return {}; return {};
......
...@@ -53,7 +53,7 @@ const static int BlockIntervalSeconds = 3; ...@@ -53,7 +53,7 @@ const static int BlockIntervalSeconds = 3;
const static int Percent100 = 10000; const static int Percent100 = 10000;
const static int Percent1 = 100; const static int Percent1 = 100;
const static UInt32 DefaultMaxBlockSize = 1024 * 1024; const static UInt32 DefaultMaxBlockSize = 5 * 1024 * 1024;
const static UInt32 DefaultTargetBlockSize = 128 * 1024; const static UInt32 DefaultTargetBlockSize = 128 * 1024;
const static UInt64 DefaultMaxStorageSize = 10 * 1024; const static UInt64 DefaultMaxStorageSize = 10 * 1024;
const static ShareType DefaultElectedPay = Asset(100).amount; const static ShareType DefaultElectedPay = Asset(100).amount;
......
...@@ -333,7 +333,7 @@ int main( int argc, char** argv ) { ...@@ -333,7 +333,7 @@ int main( int argc, char** argv ) {
for( uint32_t i = 0; i < number_of_accounts; ++i ) { for( uint32_t i = 0; i < number_of_accounts; ++i ) {
Name sender( "initb" ); Name sender( "initb" );
Name recipient( Name("benchmark").value + i); Name recipient( Name("benchmark").value + i);
uint32_t amount = 10000; uint32_t amount = 100000;
SignedTransaction trx; SignedTransaction trx;
trx.scope = sort_names({sender,recipient}); trx.scope = sort_names({sender,recipient});
...@@ -381,7 +381,7 @@ int main( int argc, char** argv ) { ...@@ -381,7 +381,7 @@ int main( int argc, char** argv ) {
transaction_set_reference_block(trx, info.head_block_id); transaction_set_reference_block(trx, info.head_block_id);
batch.emplace_back(trx); batch.emplace_back(trx);
if( batch.size() == 300 ) { if( batch.size() == 600 ) {
auto result = call( push_txns_func, batch ); auto result = call( push_txns_func, batch );
//std::cout << fc::json::to_pretty_string(result) << std::endl; //std::cout << fc::json::to_pretty_string(result) << std::endl;
batch.resize(0); batch.resize(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册