OSDN Git Service

Merge branch 'demo' of https://github.com/Bytom/blockchain into demo
[bytom/bytom.git] / protocol / bc / coinbase.go
1 package bc
2
3 import "io"
4
5 func (Coinbase) typ() string { return "coinbase1" }
6 func (c *Coinbase) writeForHash(w io.Writer) {
7         //mustWriteForHash(w, c.WitnessDestination)
8 }
9
10 func (c *Coinbase) SetDestination(id *Hash, val *AssetAmount, pos uint64) {
11         c.WitnessDestination = &ValueDestination{
12                 Ref:      id,
13                 Value:    val,
14                 Position: pos,
15         }
16 }
17
18 // NewCoinbase creates a new Coinbase.
19 func NewCoinbase() *Coinbase {
20         return &Coinbase{}
21 }