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

[R4R] fix nil pointer issue when stopping mining new block #983

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

j75689
Copy link
Contributor

@j75689 j75689 commented Jul 8, 2022

Description

t=2022-07-07T12:38:34+0000 lvl=info msg="Mining aborted due to sync"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0xff0ffd]

goroutine 110 [running]:
github.com/ethereum/go-ethereum/miner.(*worker).commitTransactions(0xc000269b80, 0xc01db799a0, 0xc076245840, 0xc01cdc87e0, 0xc076245800)
        github.com/ethereum/go-ethereum@/miner/worker.go:922 +0xc2d
github.com/ethereum/go-ethereum/miner.(*worker).fillTransactions(0xc000269b80, 0xc01cdc87e0, 0xc01db799a0)
        github.com/ethereum/go-ethereum@/miner/worker.go:1121 +0x219
github.com/ethereum/go-ethereum/miner.(*worker).commitWork(0xc000269b80, 0xc01cdc87e0, 0x1, 0x62c6d3ca)
        github.com/ethereum/go-ethereum@/miner/worker.go:1168 +0x150
github.com/ethereum/go-ethereum/miner.(*worker).mainLoop(0xc000269b80)
        github.com/ethereum/go-ethereum@/miner/worker.go:546 +0x110f
created by github.com/ethereum/go-ethereum/miner.newWorker
        github.com/ethereum/go-ethereum@/miner/worker.go:290 +0x61d

Rationale

After merging #816, miners use env instead of w.current for mining information.

Example

N/A

Changes

Notable changes:

  • miner/worker.go

@j75689 j75689 requested a review from unclezoro July 8, 2022 03:11
Copy link
Collaborator

@brilliant-lx brilliant-lx left a comment

Choose a reason for hiding this comment

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

SGTM

@unclezoro unclezoro merged commit fd1d1e3 into bnb-chain:develop Jul 8, 2022
This was referenced Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants