Skip to content

Commit

Permalink
bugfix: corrected convert to header view
Browse files Browse the repository at this point in the history
  • Loading branch information
kiltsonfire authored and Djadih committed May 20, 2024
1 parent e0e597c commit 1fdc830
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/types/wo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,11 @@ type WorkObjectHeaderView struct {
////////////////////////////////////////////////////////////

func (wo *WorkObject) ConvertToHeaderView() *WorkObjectHeaderView {
newWo := NewWorkObjectWithHeader(wo, nil, common.ZONE_CTX, HeaderObject)
newWo := NewWorkObject(wo.woHeader, wo.woBody, wo.tx)
newWo.Body().SetExtTransactions(Transactions{})
newWo.Body().SetTransactions(Transactions{})
newWo.Body().SetManifest(BlockManifest{})
newWo.Body().SetInterlinkHashes(common.Hashes{})
return &WorkObjectHeaderView{
WorkObject: newWo,
}
Expand Down

0 comments on commit 1fdc830

Please sign in to comment.