Skip to content

Commit

Permalink
txmeta: set on db read of block (ethereum#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
tynes authored Nov 4, 2020
1 parent a41858a commit c424513
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,10 @@ func ReadBlock(db ethdb.Reader, hash common.Hash, number uint64) *types.Block {
if body == nil {
return nil
}
for i := 0; i < len(body.Transactions); i++ {
meta := ReadTransactionMeta(db, body.Transactions[i].Hash())
body.Transactions[i].SetTransactionMeta(meta)
}
return types.NewBlockWithHeader(header).WithBody(body.Transactions, body.Uncles)
}

Expand Down

0 comments on commit c424513

Please sign in to comment.