mirror of https://github.com/status-im/op-geth.git
core: write individual transactions and receipts too on fast sync
This commit is contained in:
parent
fece1fa9be
commit
1cecda8333
|
@ -980,6 +980,18 @@ func (self *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain
|
|||
glog.Fatal(errs[index])
|
||||
return
|
||||
}
|
||||
if err := WriteTransactions(self.chainDb, block); err != nil {
|
||||
errs[index] = fmt.Errorf("failed to write individual transactions: %v", err)
|
||||
atomic.AddInt32(&failed, 1)
|
||||
glog.Fatal(errs[index])
|
||||
return
|
||||
}
|
||||
if err := WriteReceipts(self.chainDb, receipts); err != nil {
|
||||
errs[index] = fmt.Errorf("failed to write individual receipts: %v", err)
|
||||
atomic.AddInt32(&failed, 1)
|
||||
glog.Fatal(errs[index])
|
||||
return
|
||||
}
|
||||
atomic.AddInt32(&stats.processed, 1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue