@@ -576,7 +576,7 @@ func (bc *BlockChain) SetHead(head uint64) error {
576
576
header := bc .CurrentBlock ()
577
577
block := bc .GetBlock (header .Hash (), header .Number .Uint64 ())
578
578
if block == nil {
579
- // This should never happen. In practice, previsouly currentBlock
579
+ // This should never happen. In practice, previously currentBlock
580
580
// contained the entire block whereas now only a "marker", so there
581
581
// is an ever so slight chance for a race we should handle.
582
582
log .Error ("Current block not found in database" , "block" , header .Number , "hash" , header .Hash ())
@@ -598,7 +598,7 @@ func (bc *BlockChain) SetHeadWithTimestamp(timestamp uint64) error {
598
598
header := bc .CurrentBlock ()
599
599
block := bc .GetBlock (header .Hash (), header .Number .Uint64 ())
600
600
if block == nil {
601
- // This should never happen. In practice, previsouly currentBlock
601
+ // This should never happen. In practice, previously currentBlock
602
602
// contained the entire block whereas now only a "marker", so there
603
603
// is an ever so slight chance for a race we should handle.
604
604
log .Error ("Current block not found in database" , "block" , header .Number , "hash" , header .Hash ())
@@ -982,7 +982,7 @@ func (bc *BlockChain) stopWithoutSaving() {
982
982
func (bc * BlockChain ) Stop () {
983
983
bc .stopWithoutSaving ()
984
984
985
- // Ensure that the entirety of the state snapshot is journalled to disk.
985
+ // Ensure that the entirety of the state snapshot is journaled to disk.
986
986
var snapBase common.Hash
987
987
if bc .snaps != nil {
988
988
var err error
@@ -1193,7 +1193,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
1193
1193
// a background routine to re-indexed all indices in [ancients - txlookupLimit, ancients)
1194
1194
// range. In this case, all tx indices of newly imported blocks should be
1195
1195
// generated.
1196
- var batch = bc .db .NewBatch ()
1196
+ batch : = bc .db .NewBatch ()
1197
1197
for i , block := range blockChain {
1198
1198
if bc .txLookupLimit == 0 || ancientLimit <= bc .txLookupLimit || block .NumberU64 () >= ancientLimit - bc .txLookupLimit {
1199
1199
rawdb .WriteTxLookupEntriesByBlock (batch , block )
@@ -2585,7 +2585,7 @@ func (bc *BlockChain) SetTrieFlushInterval(interval time.Duration) {
2585
2585
bc .flushInterval .Store (int64 (interval ))
2586
2586
}
2587
2587
2588
- // GetTrieFlushInterval gets the in-memroy tries flush interval
2588
+ // GetTrieFlushInterval gets the in-memory tries flush interval
2589
2589
func (bc * BlockChain ) GetTrieFlushInterval () time.Duration {
2590
2590
return time .Duration (bc .flushInterval .Load ())
2591
2591
}
0 commit comments