Commit 19005131 authored by pengjun's avatar pengjun Committed by vipwzw

hash不匹配无需等待

parent f0140fe1
...@@ -595,14 +595,15 @@ func (client *client) CreateBlock() { ...@@ -595,14 +595,15 @@ func (client *client) CreateBlock() {
txs, blockOnMain, seqTy, err := client.RequestTx(currSeq, lastSeqMainHash) txs, blockOnMain, seqTy, err := client.RequestTx(currSeq, lastSeqMainHash)
if err != nil { if err != nil {
incSeqFlag = false
if err == paracross.ErrParaCurHashNotMatch { if err == paracross.ErrParaCurHashNotMatch {
newSeq, newSeqMainHash, err := client.switchHashMatchedBlock(currSeq) newSeq, newSeqMainHash, err := client.switchHashMatchedBlock(currSeq)
if err == nil { if err == nil {
currSeq = newSeq currSeq = newSeq
lastSeqMainHash = newSeqMainHash lastSeqMainHash = newSeqMainHash
continue;
} }
} }
incSeqFlag = false
time.Sleep(time.Second * time.Duration(blockSec)) time.Sleep(time.Second * time.Duration(blockSec))
continue continue
} }
......
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