Skip to content

Commit d1e4790

Browse files
committed
Remove whitespaces and merge version number
1 parent 0b00789 commit d1e4790

File tree

9 files changed

+34
-37
lines changed

9 files changed

+34
-37
lines changed

core/types/block.go

+1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ func CalcUncleHash(uncles []*Header) common.Hash {
421421
// the sealed one.
422422
func (b *Block) WithSeal(header *Header) *Block {
423423
cpy := *header
424+
424425
return &Block{
425426
header: &cpy,
426427
transactions: b.transactions,

eth/backend.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client l1.Client) (*Ether
153153
if err := pruner.RecoverPruning(stack.ResolvePath(""), chainDb, stack.ResolvePath(config.TrieCleanCacheJournal)); err != nil {
154154
log.Error("Failed to recover state", "error", err)
155155
}
156-
157156
eth := &Ethereum{
158157
config: config,
159158
chainDb: chainDb,
@@ -279,7 +278,7 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client l1.Client) (*Ether
279278
}); err != nil {
280279
return nil, err
281280
}
282-
281+
283282
config.Miner.SigningDisabled = config.DA.ProduceBlocks
284283
eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock, config.EnableDASyncing && !config.DA.ProduceBlocks)
285284
// Some of the extraData is used with Clique consensus (before EuclidV2). After EuclidV2 we use SystemContract consensus where this is overridden when creating a block.

eth/downloader/queue.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ func (q *queue) ReserveReceipts(p *peerConnection, count int) (*fetchRequest, bo
477477
// to access the queue, so they already need a lock anyway.
478478
//
479479
// Returns:
480-
// item - the fetchRequest
481-
// progress - whether any progress was made
482-
// throttle - if the caller should throttle for a while
480+
// item - the fetchRequest
481+
// progress - whether any progress was made
482+
// throttle - if the caller should throttle for a while
483483
func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque,
484484
pendPool map[string]*fetchRequest, kind uint) (*fetchRequest, bool, bool) {
485485
// Short circuit if the pool has been depleted, or if the peer's already

eth/protocols/eth/handlers.go

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package eth
1919
import (
2020
"encoding/json"
2121
"fmt"
22+
2223
"github.com/scroll-tech/go-ethereum/common"
2324
"github.com/scroll-tech/go-ethereum/core/types"
2425
"github.com/scroll-tech/go-ethereum/log"

les/downloader/downloader.go

+19-21
Original file line numberDiff line numberDiff line change
@@ -705,11 +705,9 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty
705705
// calculateRequestSpan calculates what headers to request from a peer when trying to determine the
706706
// common ancestor.
707707
// It returns parameters to be used for peer.RequestHeadersByNumber:
708-
//
709-
// from - starting block number
710-
// count - number of headers to request
711-
// skip - number of headers to skip
712-
//
708+
// from - starting block number
709+
// count - number of headers to request
710+
// skip - number of headers to skip
713711
// and also returns 'max', the last block which is expected to be returned by the remote peers,
714712
// given the (from,count,skip)
715713
func calculateRequestSpan(remoteHeight, localHeight uint64) (int64, int, int, uint64) {
@@ -1324,22 +1322,22 @@ func (d *Downloader) fetchReceipts(from uint64) error {
13241322
// various callbacks to handle the slight differences between processing them.
13251323
//
13261324
// The instrumentation parameters:
1327-
// - errCancel: error type to return if the fetch operation is cancelled (mostly makes logging nicer)
1328-
// - deliveryCh: channel from which to retrieve downloaded data packets (merged from all concurrent peers)
1329-
// - deliver: processing callback to deliver data packets into type specific download queues (usually within `queue`)
1330-
// - wakeCh: notification channel for waking the fetcher when new tasks are available (or sync completed)
1331-
// - expire: task callback method to abort requests that took too long and return the faulty peers (traffic shaping)
1332-
// - pending: task callback for the number of requests still needing download (detect completion/non-completability)
1333-
// - inFlight: task callback for the number of in-progress requests (wait for all active downloads to finish)
1334-
// - throttle: task callback to check if the processing queue is full and activate throttling (bound memory use)
1335-
// - reserve: task callback to reserve new download tasks to a particular peer (also signals partial completions)
1336-
// - fetchHook: tester callback to notify of new tasks being initiated (allows testing the scheduling logic)
1337-
// - fetch: network callback to actually send a particular download request to a physical remote peer
1338-
// - cancel: task callback to abort an in-flight download request and allow rescheduling it (in case of lost peer)
1339-
// - capacity: network callback to retrieve the estimated type-specific bandwidth capacity of a peer (traffic shaping)
1340-
// - idle: network callback to retrieve the currently (type specific) idle peers that can be assigned tasks
1341-
// - setIdle: network callback to set a peer back to idle and update its estimated capacity (traffic shaping)
1342-
// - kind: textual label of the type being downloaded to display in log messages
1325+
// - errCancel: error type to return if the fetch operation is cancelled (mostly makes logging nicer)
1326+
// - deliveryCh: channel from which to retrieve downloaded data packets (merged from all concurrent peers)
1327+
// - deliver: processing callback to deliver data packets into type specific download queues (usually within `queue`)
1328+
// - wakeCh: notification channel for waking the fetcher when new tasks are available (or sync completed)
1329+
// - expire: task callback method to abort requests that took too long and return the faulty peers (traffic shaping)
1330+
// - pending: task callback for the number of requests still needing download (detect completion/non-completability)
1331+
// - inFlight: task callback for the number of in-progress requests (wait for all active downloads to finish)
1332+
// - throttle: task callback to check if the processing queue is full and activate throttling (bound memory use)
1333+
// - reserve: task callback to reserve new download tasks to a particular peer (also signals partial completions)
1334+
// - fetchHook: tester callback to notify of new tasks being initiated (allows testing the scheduling logic)
1335+
// - fetch: network callback to actually send a particular download request to a physical remote peer
1336+
// - cancel: task callback to abort an in-flight download request and allow rescheduling it (in case of lost peer)
1337+
// - capacity: network callback to retrieve the estimated type-specific bandwidth capacity of a peer (traffic shaping)
1338+
// - idle: network callback to retrieve the currently (type specific) idle peers that can be assigned tasks
1339+
// - setIdle: network callback to set a peer back to idle and update its estimated capacity (traffic shaping)
1340+
// - kind: textual label of the type being downloaded to display in log messages
13431341
func (d *Downloader) fetchParts(deliveryCh chan dataPack, deliver func(dataPack) (int, error), wakeCh chan bool,
13441342
expire func() map[string]int, pending func() int, inFlight func() bool, reserve func(*peerConnection, int) (*fetchRequest, bool, bool),
13451343
fetchHook func([]*types.Header), fetch func(*peerConnection, *fetchRequest) error, cancel func(*fetchRequest), capacity func(*peerConnection) int,

les/downloader/queue.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,9 @@ func (q *queue) ReserveReceipts(p *peerConnection, count int) (*fetchRequest, bo
477477
// to access the queue, so they already need a lock anyway.
478478
//
479479
// Returns:
480-
//
481-
// item - the fetchRequest
482-
// progress - whether any progress was made
483-
// throttle - if the caller should throttle for a while
480+
// item - the fetchRequest
481+
// progress - whether any progress was made
482+
// throttle - if the caller should throttle for a while
484483
func (q *queue) reserveHeaders(p *peerConnection, count int, taskPool map[common.Hash]*types.Header, taskQueue *prque.Prque,
485484
pendPool map[string]*fetchRequest, kind uint) (*fetchRequest, bool, bool) {
486485
// Short circuit if the pool has been depleted, or if the peer's already

les/downloader/resultstore.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ func (r *resultStore) SetThrottleThreshold(threshold uint64) uint64 {
7171
// wants to reserve headers for fetching.
7272
//
7373
// It returns the following:
74-
//
75-
// stale - if true, this item is already passed, and should not be requested again
76-
// throttled - if true, the store is at capacity, this particular header is not prio now
77-
// item - the result to store data into
78-
// err - any error that occurred
74+
// stale - if true, this item is already passed, and should not be requested again
75+
// throttled - if true, the store is at capacity, this particular header is not prio now
76+
// item - the result to store data into
77+
// err - any error that occurred
7978
func (r *resultStore) AddFetch(header *types.Header, fastSync bool) (stale, throttled bool, item *fetchResult, err error) {
8079
r.lock.Lock()
8180
defer r.lock.Unlock()

miner/scroll_worker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ func (w *worker) mainLoop() {
371371
log.Error("failed to mine block", "err", err)
372372
w.current = nil
373373
}
374+
374375
idleStart := time.Now()
375376
select {
376377
case <-w.startCh:
@@ -560,7 +561,6 @@ func (w *worker) newWork(now time.Time, parentHash common.Hash, reorging bool, r
560561
// tryCommitNewWork
561562
func (w *worker) tryCommitNewWork(now time.Time, parent common.Hash, reorging bool, reorgReason error) (common.Hash, error) {
562563
err := w.newWork(now, parent, reorging, reorgReason)
563-
564564
if err != nil {
565565
return common.Hash{}, fmt.Errorf("failed creating new work: %w", err)
566566
}

params/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 5 // Major version component of the current release
2626
VersionMinor = 8 // Minor version component of the current release
27-
VersionPatch = 14 // Patch version component of the current release
27+
VersionPatch = 13 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)