mirror of
https://github.com/dragonheim/gagent.git
synced 2025-04-25 04:08:59 -07:00
refactor: refactored the chainDB and added write capability.
This commit is contained in:
parent
1bcc682b7c
commit
d5fcd11592
2 changed files with 62 additions and 24 deletions
|
@ -43,7 +43,12 @@ func Main(wg *sync.WaitGroup, config gstructs.GagentConfig) {
|
|||
workerSock, _ := zmq.NewSocket(zmq.DEALER)
|
||||
defer workerSock.Close()
|
||||
|
||||
db.Init()
|
||||
chain := gcdb.NewGagentDb()
|
||||
log.Println("[DEBUG] Loading chaindb ")
|
||||
err := chain.LoadHCL()
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Error loading chaindb: %s", err)
|
||||
}
|
||||
|
||||
workerListener := "tcp://" + config.ListenAddr + ":" + strconv.Itoa(config.WorkerPort)
|
||||
_ = workerSock.Bind(workerListener)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue