mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-25 04:08:59 -07:00
refactor: converted int64 to int32 where appropriate.
refactor: reduced usage of fmt in favor of logs and string concatication. refactor: minor re-ordering of the data structures to reduce storage space required.
This commit is contained in:
parent
8640d42132
commit
1bcc682b7c
9 changed files with 53 additions and 48 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
fmt "fmt"
|
||||
log "log"
|
||||
http "net/http"
|
||||
strconv "strconv"
|
||||
sync "sync"
|
||||
|
||||
gcdb "github.com/dragonheim/gagent/internal/chaindb"
|
||||
|
@ -44,7 +45,7 @@ func Main(wg *sync.WaitGroup, config gstructs.GagentConfig) {
|
|||
|
||||
db.Init()
|
||||
|
||||
workerListener := fmt.Sprintf("tcp://%s:%d", config.ListenAddr, config.WorkerPort)
|
||||
workerListener := "tcp://" + config.ListenAddr + ":" + strconv.Itoa(config.WorkerPort)
|
||||
_ = workerSock.Bind(workerListener)
|
||||
|
||||
workers := make([]string, 0)
|
||||
|
@ -112,7 +113,7 @@ func createClientListener(wg *sync.WaitGroup, config gstructs.GagentConfig) {
|
|||
clientSock, _ := zmq.NewSocket(zmq.ROUTER)
|
||||
defer clientSock.Close()
|
||||
|
||||
clientListener := fmt.Sprintf("tcp://%s:%d", config.ListenAddr, config.ClientPort)
|
||||
clientListener := "tcp://" + config.ListenAddr + ":" + strconv.Itoa(config.ClientPort)
|
||||
log.Printf("[DEBUG] Binding to: %s", clientListener)
|
||||
_ = clientSock.Bind(clientListener)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue