mirror of https://github.com/poanetwork/quorum.git
raft: return error if block processing is aborted
This commit is contained in:
parent
3ae914052f
commit
1d23f35b99
|
@ -1557,6 +1557,12 @@ func mergeReceipts(pub, priv types.Receipts) types.Receipts {
|
|||
func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []interface{}, []*types.Log, error) {
|
||||
// If the chain is terminating, don't even bother starting up
|
||||
if atomic.LoadInt32(&bc.procInterrupt) == 1 {
|
||||
log.Debug("Premature abort during blocks processing")
|
||||
// QUORUM
|
||||
if bc.isRaft() {
|
||||
// Only returns an error for raft mode
|
||||
return 0, nil, nil, ErrAbortBlocksProcessing
|
||||
}
|
||||
return 0, nil, nil, nil
|
||||
}
|
||||
// Start a parallel signature recovery (signer will fluke on fork transition, minimal perf loss)
|
||||
|
|
Loading…
Reference in New Issue