Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary implementations of Entity and IDentity #6912

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions model/verification/receiptDataPack.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,3 @@ type ReceiptDataPack struct {
OriginID flow.Identifier
Ctx context.Context // used for span tracing
}

// ID returns the unique identifier for the ReceiptDataPack which is the
// id of its execution receipt.
func (r *ReceiptDataPack) ID() flow.Identifier {
return r.Receipt.ID()
}

// Checksum returns the checksum of the ReceiptDataPack.
func (r *ReceiptDataPack) Checksum() flow.Identifier {
return flow.MakeID(r)
}
11 changes: 0 additions & 11 deletions model/verification/resultDataPack.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,3 @@ type ResultDataPack struct {
ExecutorID flow.Identifier
ExecutionResult *flow.ExecutionResult
}

// ID returns the unique identifier for the ResultDataPack which is the
// id of its execution result.
func (r *ResultDataPack) ID() flow.Identifier {
return r.ExecutionResult.ID()
}

// Checksum returns the checksum of the ResultDataPack.
func (r *ResultDataPack) Checksum() flow.Identifier {
return flow.MakeID(r)
}
13 changes: 0 additions & 13 deletions module/mempool/model/incorporated_result_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,3 @@ type IncorporatedResultMap struct {
ExecutionResult *flow.ExecutionResult
IncorporatedResults map[flow.Identifier]*flow.IncorporatedResult // [incorporated block ID] => IncorporatedResult
}

// ID implements flow.Entity.ID for IncorporatedResultMap to make it capable of
// being stored directly in mempools and storage.
func (a *IncorporatedResultMap) ID() flow.Identifier {
return a.ExecutionResult.ID()
}

// CheckSum implements flow.Entity.CheckSum for IncorporatedResultMap to make it
// capable of being stored directly in mempools and storage. It makes the id of
// the entire IncorporatedResultMap.
func (a *IncorporatedResultMap) Checksum() flow.Identifier {
return flow.MakeID(a)
}
Loading