blockchain: Bulk import skip script validation.
This updates block validation to not run scripts if bulk import mode is enabled. Bulk import mode is only enabled when importing blocks that are already known to be valid.
This commit is contained in:
parent
23c8ff6385
commit
8962ce7f18
@ -3820,7 +3820,7 @@ func (b *BlockChain) checkConnectBlock(node *blockNode, block, parent *dcrutil.B
|
||||
// node). This is a huge optimization because running the scripts is the
|
||||
// most time consuming portion of block handling.
|
||||
runScripts := !b.noVerify
|
||||
if b.isAssumeValidAncestor(node) {
|
||||
if b.bulkImportMode || b.isAssumeValidAncestor(node) {
|
||||
runScripts = false
|
||||
}
|
||||
var scriptFlags txscript.ScriptFlags
|
||||
|
||||
Loading…
Reference in New Issue
Block a user