OSDN Git Service

reduce the batch tx number (#557)
authorPaladz <yzhu101@uottawa.ca>
Mon, 2 Nov 2020 12:38:13 +0000 (20:38 +0800)
committerGitHub <noreply@github.com>
Mon, 2 Nov 2020 12:38:13 +0000 (20:38 +0800)
* reduce the batch tx number

* prevent the roll back

Co-authored-by: paladz <colt@ColtdeMBP.partners>
proposal/proposal.go
toolbar/federation/synchron/sidechain_keeper.go

index 9381402..ea0cc62 100644 (file)
@@ -21,7 +21,7 @@ import (
 
 const (
        logModule     = "mining"
-       batchApplyNum = 64
+       batchApplyNum = 16
        softMaxTxNum  = 128
 
        timeoutOk = iota + 1
index 8d00c78..707fdfc 100644 (file)
@@ -275,7 +275,7 @@ func (s *sidechainKeeper) syncBlock() (bool, error) {
                return false, err
        }
 
-       if netInfo.IrreversibleBlock <= chain.BlockHeight {
+       if netInfo.IrreversibleBlock <= chain.BlockHeight+s.cfg.Confirmations {
                return false, nil
        }