mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fix: make sure building of pending blocks don't have any lasting sideaffects (#779)
This commit is contained in:
parent
b9919a572a
commit
89ff451c77
2 changed files with 13 additions and 9 deletions
|
|
@ -556,6 +556,14 @@ func (w *worker) startNewPipeline(timestamp int64) {
|
|||
}
|
||||
|
||||
func (w *worker) handlePipelineResult(res *pipeline.Result) error {
|
||||
if !w.isRunning() {
|
||||
if res != nil && res.FinalBlock != nil {
|
||||
w.updateSnapshot(res.FinalBlock)
|
||||
}
|
||||
w.currentPipeline = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
if res != nil && res.OverflowingTx != nil {
|
||||
if res.FinalBlock == nil {
|
||||
// first txn overflowed the circuit, skip
|
||||
|
|
@ -602,14 +610,6 @@ func (w *worker) handlePipelineResult(res *pipeline.Result) error {
|
|||
}
|
||||
}
|
||||
|
||||
if !w.isRunning() {
|
||||
if res != nil && res.FinalBlock != nil {
|
||||
w.updateSnapshot(res.FinalBlock)
|
||||
}
|
||||
w.currentPipeline = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
var commitError error
|
||||
if res != nil && res.FinalBlock != nil {
|
||||
if commitError = w.commit(res); commitError == nil {
|
||||
|
|
@ -747,6 +747,10 @@ func (w *worker) postSideBlock(event core.ChainSideEvent) {
|
|||
}
|
||||
|
||||
func (w *worker) onTxFailingInPipeline(txIndex int, tx *types.Transaction, err error) bool {
|
||||
if !w.isRunning() {
|
||||
return false
|
||||
}
|
||||
|
||||
writeTrace := func() {
|
||||
var trace *types.BlockTrace
|
||||
var errWithTrace *pipeline.ErrorWithTrace
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 5 // Major version component of the current release
|
||||
VersionMinor = 3 // Minor version component of the current release
|
||||
VersionPatch = 24 // Patch version component of the current release
|
||||
VersionPatch = 25 // Patch version component of the current release
|
||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue