Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c113520d
Unverified
Commit
c113520d
authored
3 years ago
by
Lee Bousfield
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
miner: fix receipt deep copy in worker (#23835)
parent
57c252ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
worker.go
miner/worker.go
+10
-4
No files found.
miner/worker.go
View file @
c113520d
...
...
@@ -632,17 +632,23 @@ func (w *worker) resultLoop() {
receipts
=
make
([]
*
types
.
Receipt
,
len
(
task
.
receipts
))
logs
[]
*
types
.
Log
)
for
i
,
receipt
:=
range
task
.
receipts
{
for
i
,
taskReceipt
:=
range
task
.
receipts
{
receipt
:=
new
(
types
.
Receipt
)
receipts
[
i
]
=
receipt
*
receipt
=
*
taskReceipt
// add block location fields
receipt
.
BlockHash
=
hash
receipt
.
BlockNumber
=
block
.
Number
()
receipt
.
TransactionIndex
=
uint
(
i
)
receipts
[
i
]
=
new
(
types
.
Receipt
)
*
receipts
[
i
]
=
*
receipt
// Update the block hash in all logs since it is now available and not when the
// receipt/log of individual transactions were created.
for
_
,
log
:=
range
receipt
.
Logs
{
receipt
.
Logs
=
make
([]
*
types
.
Log
,
len
(
taskReceipt
.
Logs
))
for
i
,
taskLog
:=
range
taskReceipt
.
Logs
{
log
:=
new
(
types
.
Log
)
receipt
.
Logs
[
i
]
=
log
*
log
=
*
taskLog
log
.
BlockHash
=
hash
}
logs
=
append
(
logs
,
receipt
.
Logs
...
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment