OSDN Git Service

new repo
[bytom/vapor.git] / protocol / bc / types / coinbase.go
1 package types
2
3 // CoinbaseInput records the coinbase message
4 type CoinbaseInput struct {
5         Arbitrary []byte
6 }
7
8 // NewCoinbaseInput creates a new coinbase input struct
9 func NewCoinbaseInput(arbitrary []byte) *TxInput {
10         return &TxInput{
11                 AssetVersion: 1,
12                 TypedInput:   &CoinbaseInput{Arbitrary: arbitrary},
13         }
14 }
15
16 // InputType is the interface function for return the input type
17 func (cb *CoinbaseInput) InputType() uint8 { return CoinbaseInputType }