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