diff --git a/conf/system.conf b/conf/system.conf index b7f957dd..c5a86649 100644 --- a/conf/system.conf +++ b/conf/system.conf @@ -150,10 +150,10 @@ system { timeout { //Unit : Second 以下的超时时间一般采用默认配置 //For auto 自动采用的超时时间 - base_preload = 30//交易预执行的超时时间,单位是s - base_vote = 20//内部消息传递速度快,抽签的超时时间 - base_sync = 20//没有耗时操作,没有大块传输的情况下 - base_addition = 0//冗余量,不用配置 + //base_preload = 30//交易预执行的超时时间,单位是s + //base_vote = 20//内部消息传递速度快,抽签的超时时间 + //base_sync = 20//没有耗时操作,没有大块传输的情况下 + //base_addition = 0//冗余量,不用配置 //For config manually 手工设置超时时间,系统主动采用手工设置的时间,可以不用设置 block = 90//出块的超时时间 diff --git a/src/main/scala/rep/app/conf/TimePolicy.scala b/src/main/scala/rep/app/conf/TimePolicy.scala index ad3bb935..7ec6d07f 100644 --- a/src/main/scala/rep/app/conf/TimePolicy.scala +++ b/src/main/scala/rep/app/conf/TimePolicy.scala @@ -118,17 +118,17 @@ object TimePolicy { VOTE_WAITING_DELAY = config.getLong("system.time.block.waiting_delay") SYS_NODE_STABLE_DELAY = config.getLong("system.cluster.node_stable_delay") STABLE_TIME_DUR = config.getInt("system.time.stable_time_dur") - val policyType = config.getInt("system.time.timeout_policy_type") + //val policyType = config.getInt("system.time.timeout_policy_type") TRANSCATION_WAITING = config.getInt("system.time.timeout.transcation_waiting") - policyType match { - case PolicyType.MANUAL => + //policyType match { + // case PolicyType.MANUAL => TIMEOUT_BLOCK = config.getInt("system.time.timeout.block") TIMEOUT_ENDORSE = config.getInt("system.time.timeout.endorse") TIMEOUT_PRELOAD_TRANS = config.getInt("system.time.timeout.transaction_preload") TIMEOUT_SYNC_CHAIN = config.getInt("system.time.timeout.sync_chain") - case PolicyType.AUTO => + /* case PolicyType.AUTO => //这里我们根据经验设定算法,通过基准时间(一个出块时间),来配置其他的超时时间 //类似于默认 val basePre = config.getInt("system.time.timeout.base_preload") @@ -138,7 +138,7 @@ object TimePolicy { TIMEOUT_ENDORSE = basePre*2 TIMEOUT_BLOCK = (3 * basePre + baseAdd) TIMEOUT_SYNC_CHAIN = baseSync - } + }*/ } }