7 func (Dpos) typ() string { return "dpos1" }
8 func (d *Dpos) writeForHash(w io.Writer) {
9 mustWriteForHash(w, d.SpentOutputId)
10 mustWriteForHash(w, d.Type)
11 mustWriteForHash(w, d.From)
12 mustWriteForHash(w, d.To)
13 mustWriteForHash(w, d.Stake)
16 // SetDestination will link the spend to the output
17 func (d *Dpos) SetDestination(id *Hash, val *AssetAmount, pos uint64) {
18 d.WitnessDestination = &ValueDestination{
25 // NewDpos creates a new Spend.
26 func NewDpos(spentOutputID *Hash, ordinal uint64, t uint32, stake uint64, from, to, data string) *Dpos {
28 SpentOutputId: spentOutputID,