Commit c523c1bf authored by mdj33's avatar mdj33 Committed by vipwzw

adjust para wg seqence

parent 7524b4e5
...@@ -20,19 +20,19 @@ MKDIR=$(dir $(MKPATH)) ...@@ -20,19 +20,19 @@ MKDIR=$(dir $(MKPATH))
proj := "build" proj := "build"
.PHONY: default dep all build release cli linter race test fmt vet bench msan coverage coverhtml docker docker-compose protobuf clean help autotest .PHONY: default dep all build release cli linter race test fmt vet bench msan coverage coverhtml docker docker-compose protobuf clean help autotest
default: depends build default: build depends
build: build: depends
go build $(BUILD_FLAGS) -v -i -o $(APP) go build $(BUILD_FLAGS) -v -i -o $(APP)
go build $(BUILD_FLAGS) -v -i -o $(CLI) $(SRC_CLI) go build $(BUILD_FLAGS) -v -i -o $(CLI) $(SRC_CLI)
@cp chain33.toml $(CHAIN33_PATH)/build/system-test-rpc.sh build/ @cp chain33.toml $(CHAIN33_PATH)/build/system-test-rpc.sh build/
@cp chain33.para.toml build/ci/paracross/
build_ci: depends ## Build the binary file for CI build_ci: depends ## Build the binary file for CI
@go build -v -i -o $(CLI) $(SRC_CLI) @go build -v -i -o $(CLI) $(SRC_CLI)
@go build $(BUILD_FLAGS) -v -o $(APP) @go build $(BUILD_FLAGS) -v -o $(APP)
@cp chain33.toml $(CHAIN33_PATH)/build/system-test-rpc.sh build/ @cp chain33.toml $(CHAIN33_PATH)/build/system-test-rpc.sh build/
@cp chain33.para.toml build/ci/paracross/
para: para:
@go build -v -o build/$(NAME) -ldflags "-X $(SRC_CLI)/buildflags.ParaName=user.p.$(NAME). -X $(SRC_CLI)/buildflags.RPCAddr=http://localhost:8901" $(SRC_CLI) @go build -v -o build/$(NAME) -ldflags "-X $(SRC_CLI)/buildflags.ParaName=user.p.$(NAME). -X $(SRC_CLI)/buildflags.RPCAddr=http://localhost:8901" $(SRC_CLI)
...@@ -157,6 +157,7 @@ protobuf: ## Generate protbuf file of types package ...@@ -157,6 +157,7 @@ protobuf: ## Generate protbuf file of types package
depends: ## Generate depends file of types package depends: ## Generate depends file of types package
@find ./plugin/dapp -maxdepth 2 -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \; @find ./plugin/dapp -maxdepth 2 -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \;
@find ./vendor/github.com/33cn/chain33/system/dapp -maxdepth 2 -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \; @find ./vendor/github.com/33cn/chain33/system/dapp -maxdepth 2 -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \;
@cp chain33.para.toml build/ci/paracross/
help: ## Display this help screen help: ## Display this help screen
@printf "Help doc:\nUsage: make [command]\n" @printf "Help doc:\nUsage: make [command]\n"
......
...@@ -208,11 +208,13 @@ func (client *client) CheckBlock(parent *types.Block, current *types.BlockDetail ...@@ -208,11 +208,13 @@ func (client *client) CheckBlock(parent *types.Block, current *types.BlockDetail
} }
func (client *client) Close() { func (client *client) Close() {
client.BaseClient.Close()
close(client.commitMsgClient.quit) close(client.commitMsgClient.quit)
close(client.quitCreate) close(client.quitCreate)
close(client.blockSyncClient.quitChan) close(client.blockSyncClient.quitChan)
client.wg.Wait() client.wg.Wait()
client.BaseClient.Close()
plog.Info("consensus para closed") plog.Info("consensus para closed")
} }
......
...@@ -525,5 +525,6 @@ out: ...@@ -525,5 +525,6 @@ out:
} }
} }
plog.Info("para CreateBlock quit")
client.wg.Done() client.wg.Done()
} }
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