get_config.cpp 682 字节
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 10 11 12 13 14 15

namespace eos { namespace chain {

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

N
Nathan Hourt 已提交
16 17
   result["KeyPrefix"] = config::KeyPrefix;
   result["BlockIntervalSeconds"] = config::BlockIntervalSeconds;
18 19
   result["MaxBlockSize"] = config::DefaultMaxBlockSize;
   result["MaxSecondsUntilExpiration"] = config::DefaultMaxTrxLifetime;
N
Nathan Hourt 已提交
20
   result["ProducerCount"] = config::BlocksPerRound;
N
Nathan Hourt 已提交
21
   result["IrreversibleThresholdPercent"] = config::IrreversibleThresholdPercent;
N
Nathan Hourt 已提交
22 23 24 25
   return result;
}

} } // eos::chain