Commit 6811bb28 authored by harrylee2015's avatar harrylee2015 Committed by vipwzw

ajust name for isCaughtUp

parent d93b32d2
...@@ -60,7 +60,7 @@ type client struct { ...@@ -60,7 +60,7 @@ type client struct {
conn *grpc.ClientConn conn *grpc.ClientConn
grpcClient types.Chain33Client grpcClient types.Chain33Client
paraClient paracross.ParacrossClient paraClient paracross.ParacrossClient
isCaughtup bool isCaughtUp bool
commitMsgClient *commitMsgClient commitMsgClient *commitMsgClient
authAccount string authAccount string
privateKey crypto.PrivKey privateKey crypto.PrivKey
...@@ -119,7 +119,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module { ...@@ -119,7 +119,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
paraClient: paraCli, paraClient: paraCli,
authAccount: cfg.AuthAccount, authAccount: cfg.AuthAccount,
privateKey: priKey, privateKey: priKey,
isCaughtup: false, isCaughtUp: false,
} }
if cfg.WaitBlocks4CommitMsg < 2 { if cfg.WaitBlocks4CommitMsg < 2 {
...@@ -445,9 +445,9 @@ func (client *client) RequestTx(currSeq int64, preMainBlockHash []byte) ([]*type ...@@ -445,9 +445,9 @@ func (client *client) RequestTx(currSeq int64, preMainBlockHash []byte) ([]*type
plog.Info("GetCurrentSeq", "Len of txs", len(txs), "seqTy", seqTy) plog.Info("GetCurrentSeq", "Len of txs", len(txs), "seqTy", seqTy)
if lastSeq-currSeq > emptyBlockInterval { if lastSeq-currSeq > emptyBlockInterval {
client.isCaughtup = false client.isCaughtUp = false
} else { } else {
client.isCaughtup = true client.isCaughtUp = true
} }
if client.authAccount != "" { if client.authAccount != "" {
...@@ -655,7 +655,7 @@ func (client *client) CreateBlock() { ...@@ -655,7 +655,7 @@ func (client *client) CreateBlock() {
plog.Error("Incorrect sequence type") plog.Error("Incorrect sequence type")
incSeqFlag = false incSeqFlag = false
} }
if client.isCaughtup { if client.isCaughtUp {
time.Sleep(time.Second * time.Duration(blockSec)) time.Sleep(time.Second * time.Duration(blockSec))
} }
} }
...@@ -772,7 +772,7 @@ func (client *client) Query_IsCaughtUp(req *types.ReqNil) (types.Message, error) ...@@ -772,7 +772,7 @@ func (client *client) Query_IsCaughtUp(req *types.ReqNil) (types.Message, error)
if client == nil { if client == nil {
return nil, fmt.Errorf("client not bind message queue.") return nil, fmt.Errorf("client not bind message queue.")
} }
return &types.IsCaughtUp{Iscaughtup: client.isCaughtup}, nil return &types.IsCaughtUp{Iscaughtup: client.isCaughtUp}, nil
} }
func checkMinerTx(current *types.BlockDetail) error { func checkMinerTx(current *types.BlockDetail) error {
......
...@@ -83,7 +83,7 @@ out: ...@@ -83,7 +83,7 @@ out:
} }
case block := <-client.mainBlockAdd: case block := <-client.mainBlockAdd:
if client.currentTx != nil && client.paraClient.isCaughtup { if client.currentTx != nil && client.paraClient.isCaughtUp {
exist := checkTxInMainBlock(client.currentTx, block) exist := checkTxInMainBlock(client.currentTx, block)
if exist { if exist {
finishHeight = sendingHeight finishHeight = sendingHeight
......
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