-
Notifications
You must be signed in to change notification settings - Fork 177
/
incorporated_result_seal.go
30 lines (25 loc) · 1.12 KB
/
incorporated_result_seal.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package flow
// IncorporatedResultSeal is a wrapper around a seal that keeps track of which
// IncorporatedResult the seal corresponds to. Sealing is a function of result
// And the ID of the block in which the result was incorporated, which is all
// contained in IncorporatedResult.
type IncorporatedResultSeal struct {
// IncorporatedResult is the incorporated result (result + ID of block where
// it was incorporated) that the seal is for.
IncorporatedResult *IncorporatedResult
// Seal is a seal for the result contained in IncorporatedResult.
Seal *Seal
// the header of the executed block
// useful for indexing the seal by height in the mempool in order for fast pruning
Header *Header
}
// ID implements flow.Entity.ID for IncorporatedResultSeal to make it capable of
// being stored directly in mempools and storage.
func (s *IncorporatedResultSeal) ID() Identifier {
return s.IncorporatedResult.ID()
}
// CheckSum implements flow.Entity.CheckSum for IncorporatedResultSeal to make
// it capable of being stored directly in mempools and storage.
func (s *IncorporatedResultSeal) Checksum() Identifier {
return MakeID(s)
}