Commit 374d622a authored by vipwzw's avatar vipwzw

auto ci

parent 27b80e92
...@@ -446,7 +446,7 @@ function para_cross_transfer_withdraw_for_token() { ...@@ -446,7 +446,7 @@ function para_cross_transfer_withdraw_for_token() {
done done
} }
function para_nodemanage_node_join(){ function para_nodemanage_node_join() {
echo "================# para node manage test =================" echo "================# para node manage test ================="
balance=$(${CLI} account balance -a 1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY -e paracross | jq -r ".balance") balance=$(${CLI} account balance -a 1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY -e paracross | jq -r ".balance")
if [ "$balance" != "$PARA_COIN_FROZEN" ]; then if [ "$balance" != "$PARA_COIN_FROZEN" ]; then
...@@ -474,7 +474,7 @@ function para_nodemanage_node_join(){ ...@@ -474,7 +474,7 @@ function para_nodemanage_node_join(){
} }
function para_nodemanage_quit_test(){ function para_nodemanage_quit_test() {
para_nodemanage_node_join para_nodemanage_node_join
echo "=========== # para chain node quit =============" echo "=========== # para chain node quit ============="
...@@ -482,7 +482,6 @@ function para_nodemanage_quit_test(){ ...@@ -482,7 +482,6 @@ function para_nodemanage_quit_test(){
echo "${hash}" echo "${hash}"
query_tx "${PARA_CLI}" "${hash}" query_tx "${PARA_CLI}" "${hash}"
balance=$(${CLI} account balance -a 1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY -e paracross | jq -r ".balance") balance=$(${CLI} account balance -a 1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY -e paracross | jq -r ".balance")
if [ "$balance" != "$PARA_COIN_FROZEN" ]; then if [ "$balance" != "$PARA_COIN_FROZEN" ]; then
echo "unfrozen coinfrozen error balance=$balance" echo "unfrozen coinfrozen error balance=$balance"
......
...@@ -202,13 +202,13 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error) ...@@ -202,13 +202,13 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
return nil, errors.Wrapf(pt.ErrParaUnSupportNodeOper, "nodeAddr %s was quit status:%d", a.fromaddr, stat.Status) return nil, errors.Wrapf(pt.ErrParaUnSupportNodeOper, "nodeAddr %s was quit status:%d", a.fromaddr, stat.Status)
} }
if stat.Status == pt.ParacrossNodeAdded{ if stat.Status == pt.ParacrossNodeAdded {
groupKey := calcParaNodeGroupKey(config.Title) groupKey := calcParaNodeGroupKey(config.Title)
nodes, _, err := getNodes(a.db, groupKey) nodes, _, err := getNodes(a.db, groupKey)
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "getNodes for title:%s", config.Title) return nil, errors.Wrapf(err, "getNodes for title:%s", config.Title)
} }
if !validNode(a.fromaddr, nodes){ if !validNode(a.fromaddr, nodes) {
return nil, errors.Wrapf(pt.ErrParaNodeAddrNotExisted, "nodeAddr not existed:%s", a.fromaddr) return nil, errors.Wrapf(pt.ErrParaNodeAddrNotExisted, "nodeAddr not existed:%s", a.fromaddr)
} }
//不允许最后一个账户退出 //不允许最后一个账户退出
...@@ -217,7 +217,6 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error) ...@@ -217,7 +217,6 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
} }
} }
var copyStat pt.ParaNodeAddrStatus var copyStat pt.ParaNodeAddrStatus
err = deepCopy(&copyStat, stat) err = deepCopy(&copyStat, stat)
if err != nil { if err != nil {
...@@ -334,16 +333,16 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error) ...@@ -334,16 +333,16 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
most, vote := getMostVote(stat) most, vote := getMostVote(stat)
if !isCommitDone(stat, nodes, most) { if !isCommitDone(stat, nodes, most) {
superManagerPass := false superManagerPass := false
if isSuperManager(a.fromaddr){ if isSuperManager(a.fromaddr) {
confStopBlocks := conf.GInt("paraConsensusStopBlocks") confStopBlocks := conf.GInt("paraConsensusStopBlocks")
data,err := a.exec.paracrossGetHeight(config.Title) data, err := a.exec.paracrossGetHeight(config.Title)
if err != nil{ if err != nil {
clog.Info("paracross.nodeVote get consens height","err",err.Error()) clog.Info("paracross.nodeVote get consens height", "err", err.Error())
return nil, err return nil, err
} }
consensHeight := data.(*pt.ParacrossStatus).Height consensHeight := data.(*pt.ParacrossStatus).Height
if a.exec.GetMainHeight() > consensHeight+confStopBlocks{ if a.exec.GetMainHeight() > consensHeight+confStopBlocks {
clog.Info("paracross.nodeVote, super manager pass","currHeight",a.height,"consensHeight",consensHeight,"confHeight",confStopBlocks) clog.Info("paracross.nodeVote, super manager pass", "currHeight", a.height, "consensHeight", consensHeight, "confHeight", confStopBlocks)
superManagerPass = true superManagerPass = true
} }
} }
......
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