pull/4465/head
“GheisMohammadi” 1 year ago
parent 7c3807a525
commit d4c85772e2
No known key found for this signature in database
GPG Key ID: 15073AED3829FE90
  1. 28
      api/service/stagedstreamsync/stage_bodies.go
  2. 2
      core/blockchain_impl.go

@ -21,14 +21,14 @@ type StageBodies struct {
} }
type StageBodiesCfg struct { type StageBodiesCfg struct {
bc core.BlockChain bc core.BlockChain
db kv.RwDB db kv.RwDB
blockDBs []kv.RwDB blockDBs []kv.RwDB
concurrency int concurrency int
protocol syncProtocol protocol syncProtocol
isBeacon bool isBeacon bool
extractReceiptHashes bool extractReceiptHashes bool
logProgress bool logProgress bool
} }
func NewStageBodies(cfg StageBodiesCfg) *StageBodies { func NewStageBodies(cfg StageBodiesCfg) *StageBodies {
@ -39,14 +39,14 @@ func NewStageBodies(cfg StageBodiesCfg) *StageBodies {
func NewStageBodiesCfg(bc core.BlockChain, db kv.RwDB, blockDBs []kv.RwDB, concurrency int, protocol syncProtocol, isBeacon bool, extractReceiptHashes bool, logProgress bool) StageBodiesCfg { func NewStageBodiesCfg(bc core.BlockChain, db kv.RwDB, blockDBs []kv.RwDB, concurrency int, protocol syncProtocol, isBeacon bool, extractReceiptHashes bool, logProgress bool) StageBodiesCfg {
return StageBodiesCfg{ return StageBodiesCfg{
bc: bc, bc: bc,
db: db, db: db,
blockDBs: blockDBs, blockDBs: blockDBs,
concurrency: concurrency, concurrency: concurrency,
protocol: protocol, protocol: protocol,
isBeacon: isBeacon, isBeacon: isBeacon,
extractReceiptHashes: extractReceiptHashes, extractReceiptHashes: extractReceiptHashes,
logProgress: logProgress, logProgress: logProgress,
} }
} }

@ -1659,7 +1659,7 @@ func (bc *BlockChainImpl) insertChainWithBlockExecution(chain types.Blocks, veri
return 0, events, coalescedLogs, nil return 0, events, coalescedLogs, nil
} }
//receiptChain []types.Receipts, // insertChainWithoutBlockExecution adds a set of blocks to blockchain without adding states
func (bc *BlockChainImpl) insertChainWithoutBlockExecution(chain types.Blocks, verifyHeaders bool) (int, []interface{}, []*types.Log, error) { func (bc *BlockChainImpl) insertChainWithoutBlockExecution(chain types.Blocks, verifyHeaders bool) (int, []interface{}, []*types.Log, error) {
// Sanity check that we have something meaningful to import // Sanity check that we have something meaningful to import
if len(chain) == 0 { if len(chain) == 0 {

Loading…
Cancel
Save