small efficiency increase
This commit is contained in:
parent
878a53bf0d
commit
d2163017ce
|
@ -244,17 +244,18 @@ func processGenTxs(genTxsDir string, cdc *wire.Codec, appInit AppInit) (
|
||||||
sort.Strings(nodeIDs)
|
sort.Strings(nodeIDs)
|
||||||
|
|
||||||
for _, nodeID := range nodeIDs {
|
for _, nodeID := range nodeIDs {
|
||||||
|
genTx := genTxs[nodeID]
|
||||||
|
|
||||||
// combine some stuff
|
// combine some stuff
|
||||||
validators = append(validators, genTxs[nodeID].Validator)
|
validators = append(validators, genTx.Validator)
|
||||||
appGenTxs = append(appGenTxs, genTxs[nodeID].AppGenTx)
|
appGenTxs = append(appGenTxs, genTx.AppGenTx)
|
||||||
|
|
||||||
// Add a persistent peer
|
// Add a persistent peer
|
||||||
comma := ","
|
comma := ","
|
||||||
if len(persistentPeers) == 0 {
|
if len(persistentPeers) == 0 {
|
||||||
comma = ""
|
comma = ""
|
||||||
}
|
}
|
||||||
persistentPeers += fmt.Sprintf("%s%s@%s:46656", comma, genTxs[nodeID].NodeID,
|
persistentPeers += fmt.Sprintf("%s%s@%s:46656", comma, genTx.NodeID, genTx.IP)
|
||||||
genTxs[nodeID].IP)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue