@ -92,6 +92,7 @@ var (
// consensusValidFlags are flags that are effective
// consensusValidFlags are flags that are effective
consensusValidFlags = [ ] cli . Flag {
consensusValidFlags = [ ] cli . Flag {
consensusMinPeersFlag ,
consensusMinPeersFlag ,
consensusAggregateSigFlag ,
legacyConsensusMinPeersFlag ,
legacyConsensusMinPeersFlag ,
}
}
@ -746,6 +747,11 @@ var (
DefValue : defaultConsensusConfig . MinPeers ,
DefValue : defaultConsensusConfig . MinPeers ,
Hidden : true ,
Hidden : true ,
}
}
consensusAggregateSigFlag = cli . BoolFlag {
Name : "consensus.aggregate-sig" ,
Usage : "(multi-key) aggregate bls signatures before sending" ,
DefValue : defaultConsensusConfig . AggregateSig ,
}
legacyDelayCommitFlag = cli . StringFlag {
legacyDelayCommitFlag = cli . StringFlag {
Name : "delay_commit" ,
Name : "delay_commit" ,
Usage : "how long to delay sending commit messages in consensus, ex: 500ms, 1s" ,
Usage : "how long to delay sending commit messages in consensus, ex: 500ms, 1s" ,
@ -766,7 +772,7 @@ var (
)
)
func applyConsensusFlags ( cmd * cobra . Command , config * harmonyConfig ) {
func applyConsensusFlags ( cmd * cobra . Command , config * harmonyConfig ) {
if cli . HasFlagsChanged ( cmd , consensusValidFlags ) {
if config . Consensus == nil && c li . HasFlagsChanged ( cmd , consensusValidFlags ) {
cfg := getDefaultConsensusConfigCopy ( )
cfg := getDefaultConsensusConfigCopy ( )
config . Consensus = & cfg
config . Consensus = & cfg
}
}
@ -776,6 +782,10 @@ func applyConsensusFlags(cmd *cobra.Command, config *harmonyConfig) {
} else if cli . IsFlagChanged ( cmd , legacyConsensusMinPeersFlag ) {
} else if cli . IsFlagChanged ( cmd , legacyConsensusMinPeersFlag ) {
config . Consensus . MinPeers = cli . GetIntFlagValue ( cmd , legacyConsensusMinPeersFlag )
config . Consensus . MinPeers = cli . GetIntFlagValue ( cmd , legacyConsensusMinPeersFlag )
}
}
if cli . IsFlagChanged ( cmd , consensusAggregateSigFlag ) {
config . Consensus . AggregateSig = cli . GetBoolFlagValue ( cmd , consensusAggregateSigFlag )
}
}
}
// transaction pool flags
// transaction pool flags