github.com/Bytom/bytom@v1.1.2-0.20210127130405-ae40204c0b09/protocol/bc/retirement.go (about) 1 package bc 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 }