OSDN Git Service

new repo
[bytom/vapor.git] / protocol / bc / types / bytom / retirement.go
1 package bytom
2
3 import "io"
4
5 // Retirement is for the permanent removal of some value from a
6 // blockchain. The value it contains can never be obtained by later
7 // entries. Retirement satisfies the Entry interface.
8
9 func (Retirement) typ() string { return "retirement1" }
10 func (r *Retirement) writeForHash(w io.Writer) {
11         mustWriteForHash(w, r.Source)
12 }
13
14 // NewRetirement creates a new Retirement.
15 func NewRetirement(source *ValueSource, ordinal uint64) *Retirement {
16         return &Retirement{
17                 Source:  source,
18                 Ordinal: ordinal,
19         }
20 }