get_config.cpp 704 字节
Newer Older
A
Andrianto Lie 已提交
1 2 3
/**
 *  @file
 *  @copyright defined in eos/LICENSE.txt
N
Nathan Hourt 已提交
4 5 6 7
 */

#include <eos/chain/get_config.hpp>
#include <eos/chain/config.hpp>
N
Nathan Hourt 已提交
8
#include <eos/chain/types.hpp>
N
Nathan Hourt 已提交
9

P
Pravin 已提交
10
namespace eosio { namespace chain {
N
Nathan Hourt 已提交
11 12 13 14 15

fc::variant_object get_config()
{
   fc::mutable_variant_object result;

16 17 18 19 20 21
   result["key_prefix"] = config::key_prefix;
   result["block_interval_seconds"] = config::block_interval_seconds;
   result["MaxBlockSize"] = config::default_max_block_size;
   result["MaxSecondsUntilExpiration"] = config::default_max_trx_lifetime;
   result["ProducerCount"] = config::blocks_per_round;
   result["irreversible_threshold_percent"] = config::irreversible_threshold_percent;
N
Nathan Hourt 已提交
22 23 24
   return result;
}

P
Pravin 已提交
25
} } // eosio::chain