github.com/turingchain2020/turingchain@v1.1.21/blockchain/exec.go (about) 1 // Copyright Turing Corp. 2018 All Rights Reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package blockchain 6 7 import ( 8 "github.com/turingchain2020/turingchain/queue" 9 "github.com/turingchain2020/turingchain/types" 10 "github.com/turingchain2020/turingchain/util" 11 ) 12 13 //执行区块将变成一个私有的函数 14 func execBlock(client queue.Client, prevStateRoot []byte, block *types.Block, errReturn bool, sync bool) (*types.BlockDetail, []*types.Transaction, error) { 15 return util.ExecBlock(client, prevStateRoot, block, errReturn, sync, true) 16 } 17 18 //从本地执行区块 19 func execBlockUpgrade(client queue.Client, prevStateRoot []byte, block *types.Block, sync bool) error { 20 return util.ExecBlockUpgrade(client, prevStateRoot, block, sync) 21 }