Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format codestyle of WithSidecars #2327

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,11 +1404,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [

// Write all chain data to ancients.
td := bc.GetTd(first.Hash(), first.NumberU64())
var (
writeSize int64
err error
)
writeSize, err = rawdb.WriteAncientBlocks(bc.db, blockChain, receiptChain, td)
writeSize, err := rawdb.WriteAncientBlocks(bc.db, blockChain, receiptChain, td)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roll back the code


if err != nil {
log.Error("Error importing chain data to ancients", "err", err)
Expand Down
4 changes: 1 addition & 3 deletions core/rawdb/freezer_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ type freezerBatch struct {
}

func newFreezerBatch(f *Freezer) *freezerBatch {
batch := &freezerBatch{
tables: make(map[string]*freezerTableBatch, len(f.tables)),
}
batch := &freezerBatch{tables: make(map[string]*freezerTableBatch, len(f.tables))}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roll back the code

for kind, table := range f.tables {
batch.tables[kind] = table.newBatch(f.offset)
}
Expand Down
6 changes: 3 additions & 3 deletions core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ func (b *Block) WithSidecars(sidecars BlobSidecars) *Block {
transactions: b.transactions,
uncles: b.uncles,
withdrawals: b.withdrawals,
sidecars: sidecars,
}
if b.withdrawals != nil {
block.withdrawals = b.withdrawals
if b.sidecars != nil {
block.sidecars = make(BlobSidecars, len(sidecars))
copy(block.sidecars, sidecars)
}
return block
}
Expand Down
Loading