mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core: Fixed segfault in failing tests, due to false assumption of bc *Blockchain being non-nil.
This commit is contained in:
parent
169c590b07
commit
2ecb6ab7ae
1 changed files with 3 additions and 1 deletions
|
|
@ -126,7 +126,9 @@ func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, author *common
|
||||||
|
|
||||||
retData := types.ReturnData{TxHash: receipt.TxHash, Data: data, Removed: false}
|
retData := types.ReturnData{TxHash: receipt.TxHash, Data: data, Removed: false}
|
||||||
txPostEvent := TransactionEvent{TxHash: receipt.TxHash, RetData: retData}
|
txPostEvent := TransactionEvent{TxHash: receipt.TxHash, RetData: retData}
|
||||||
go bc.txPostFeed.Send(&txPostEvent)
|
if bc != nil { // For some tests unrelated to tx events, this ptr can be nil; should always be non-nil in production
|
||||||
|
go bc.txPostFeed.Send(&txPostEvent)
|
||||||
|
}
|
||||||
|
|
||||||
return receipt, gas, err
|
return receipt, gas, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue