Commit a7f300a9 authored by duanjinfei's avatar duanjinfei

add validator url

parent 705814c8
...@@ -20,6 +20,7 @@ type Config struct { ...@@ -20,6 +20,7 @@ type Config struct {
NodeManagerNum int64 `json:"node_manager_num"` NodeManagerNum int64 `json:"node_manager_num"`
ChainID int64 `json:"chain_id"` ChainID int64 `json:"chain_id"`
ApiUrl string `json:"api_url"` ApiUrl string `json:"api_url"`
ValidatorUrl string `json:"validator_url"`
} }
var _cfg *Config = nil var _cfg *Config = nil
......
...@@ -6,5 +6,6 @@ ...@@ -6,5 +6,6 @@
"heart_response": 30, "heart_response": 30,
"task_validator_time": 1, "task_validator_time": 1,
"container_num": 1, "container_num": 1,
"chain_id": 100 "chain_id": 100,
"validator_url": "192.168.1.211:9431"
} }
\ No newline at end of file
...@@ -108,7 +108,7 @@ func (p *ProofWorker) ProofStorage() { ...@@ -108,7 +108,7 @@ func (p *ProofWorker) ProofStorage() {
} }
func (p *ProofWorker) CommitWitness() { func (p *ProofWorker) CommitWitness() {
validatorClient := operate.ConnValidatorGrpc("192.168.1.211:9431") validatorClient := operate.ConnValidatorGrpc(conf.GetConfig().ValidatorUrl)
for { for {
select { select {
case proofs := <-p.consumeProofChan: case proofs := <-p.consumeProofChan:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment