Skip to content

Commit

Permalink
pass command line params to p2p conf (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhoSoup authored Oct 9, 2020
1 parent 4a7c0d1 commit 238d2fe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions engine/NetStart.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"fmt"
"os"
"reflect"
"strconv"
"sync"
"time"

Expand Down Expand Up @@ -306,6 +307,14 @@ func startNetwork(w *worker.Thread, p *globals.FactomParams) {
panic("Invalid Network choice in Config File or command line. Choose MAIN, TEST, LOCAL, or CUSTOM")
}

if p.Peers != "" {
configPeers = p.Peers
}

if p.NetworkPortOverride > 0 {
networkPort = strconv.Itoa(p.NetworkPortOverride)
}

// FIXME: should this be relocated?
p2pconf := p2p.DefaultP2PConfiguration()
p2pconf.Network = networkID
Expand Down

0 comments on commit 238d2fe

Please sign in to comment.