Skip to content

Commit

Permalink
params: fix ChainConfig.String for Ethash (#2793)
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 authored Dec 10, 2024
1 parent 01b2876 commit 146b539
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
18 changes: 9 additions & 9 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"runtime"
"slices"
"sort"
"strings"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -347,14 +346,15 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
}
systemcontracts.GenesisHash = genesisHash
log.Info("Initialised chain configuration", "config", chainConfig)

log.Info("")
log.Info(strings.Repeat("-", 153))
for _, line := range strings.Split(chainConfig.Description(), "\n") {
log.Info(line)
}
log.Info(strings.Repeat("-", 153))
log.Info("")
/*
log.Info("")
log.Info(strings.Repeat("-", 153))
for _, line := range strings.Split(chainConfig.Description(), "\n") {
log.Info(line)
}
log.Info(strings.Repeat("-", 153))
log.Info("")
*/

bc := &BlockChain{
chainConfig: chainConfig,
Expand Down
8 changes: 8 additions & 0 deletions core/types/blob_sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ func (s BlobSidecars) EncodeIndex(i int, w *bytes.Buffer) {
rlp.Encode(w, s[i])
}

func (s BlobSidecars) BlobTxSidecarList() []*BlobTxSidecar {
var inner []*BlobTxSidecar
for _, sidecar := range s {
inner = append(inner, &(sidecar.BlobTxSidecar))
}
return inner
}

type BlobSidecar struct {
BlobTxSidecar
BlockNumber *big.Int `json:"blockNumber"`
Expand Down
6 changes: 3 additions & 3 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1205,9 +1205,9 @@ func (w *worker) generateWork(params *generateParams, witness bool) *newPayloadR
}

return &newPayloadResult{
block: block,
fees: fees.ToBig(),
// sidecars: work.sidecars,
block: block,
fees: fees.ToBig(),
sidecars: work.sidecars.BlobTxSidecarList(),
stateDB: work.state,
receipts: receipts,
requests: requests,
Expand Down
4 changes: 2 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ func (c *ChainConfig) String() string {
var engine interface{}

switch {
case c.Parlia != nil:
engine = c.Parlia
case c.Ethash != nil:
engine = c.Ethash
case c.Clique != nil:
engine = c.Clique
case c.Parlia != nil:
Expand Down

0 comments on commit 146b539

Please sign in to comment.