// GetBytesTransaction get the bytes of Transaction from the message
493160
func GetBytesTransaction(tx *peer.Transaction) ([]byte, error) {
	bytes, err := proto.Marshal(tx)
	return bytes, errors.Wrap(err, "error unmarshaling Transaction")
}
1307264
func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) hexutil.Bytes {
	if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
		return newRPCRawTransactionFromBlockIndex(block, uint64(index))
	}
	return nil
}
295143
func NewTransaction(nonce int64, to *Address, amount *BigInt, gasLimit int64, gasPrice *BigInt, data []byte) *Transaction {
	if to == nil {
		return &Transaction{types.NewContractCreation(uint64(nonce), amount.bigint, uint64(gasLimit), gasPrice.bigint, common.CopyBytes(data))}
	}
	return &Transaction{types.NewTransaction(uint64(nonce), to.address, amount.bigint, uint64(gasLimit), gasPrice.bigint, common.CopyBytes(data))}
}
943872
func (ec *EthereumClient) GetTransactionInBlock(ctx *Context, hash *Hash, index int) (tx *Transaction, _ error) {
	rawTx, err := ec.client.TransactionInBlock(ctx.context, hash.hash, uint(index))
	return &Transaction{rawTx}, err

}
750895
func (t *Tag) GetMessage() string {
	if t == nil || t.Message == nil {
		return ""
	}
	return *t.Message
}
1245858
func (db *TXDatabaseOverlay) GetTX(txid string) (interfaces.ITransaction, error) {
	txs, err := db.GetAllTXs()
	if err != nil {
		return nil, err
	}

	for _, tx := range txs {
		if tx.GetSigHash().String() == txid {
			return tx, nil
		}
	}

	return nil, fmt.Errorf("Transaction not found")
}
333386
func (rpc *EthRPC) EthGetTransactionReceipt(hash string) (*TransactionReceipt, error) {
	transactionReceipt := new(TransactionReceipt)

	err := rpc.call("eth_getTransactionReceipt", transactionReceipt, hash)
	if err != nil {
		return nil, err
	}

	return transactionReceipt, nil
}
1056548
func (p *PullRequestMergeResult) GetMessage() string {
	if p == nil || p.Message == nil {
		return ""
	}
	return *p.Message
}
1036903
func GetTmpTransaction(name string) (*Transaction, error) {
	txs, err := ListTransactionsTmp()
	if err != nil {
		return nil, err
	}

	for _, tx := range txs {
		if tx.Name == name {
			return tx, nil
		}
	}

	return nil, fmt.Errorf("Transaction not found")
}
305371
func NewTransaction(readCol, writeCol []string) *Transaction {
	if readCol == nil {
		readCol = []string{}
	}
	if writeCol == nil {
		writeCol = []string{}
	}
	return &Transaction{readCol: readCol, writeCol: writeCol}
}
1104802
func (c *Contract) GetByte(n uint64) byte {
	if n < uint64(len(c.Code)) {
		return c.Code[n]
	}

	return 0
}
29446
func (tm *transactionManager) genIndexKeyByTrans(trans *transaction) string {
	return tm.genIndexKey(trans.data["q"].(string), trans.node.addr.String())
}
776079
func (c *Client) GetTransactionAsync(txHash *chainhash.Hash) FutureGetTransactionResult {
	hash := ""
	if txHash != nil {
		hash = txHash.String()
	}

	cmd := btcjson.NewGetTransactionCmd(hash, nil)
	return c.sendCmd(cmd)
}
693148
func (ec *EthereumClient) GetTransactionByHash(ctx *Context, hash *Hash) (tx *Transaction, _ error) {
	// TODO(karalabe): handle isPending
	rawTx, _, err := ec.client.TransactionByHash(ctx.context, hash.hash)
	return &Transaction{rawTx}, err
}
824758
func IsTransactionTrytesWithMWM(trytes Trytes, mwm uint) (bool, error) {
	correctLength := IsTrytesOfExactLength(trytes, TransactionTrytesSize)
	if !correctLength {
		return false, nil
	}

	trits, err := TrytesToTrits(trytes)
	if err != nil {
		return false, err
	}

	hashTrits, err := curl.HashTrits(trits)
	if err != nil {
		return false, err
	}

	for _, trit := range hashTrits[len(hashTrits)-int(mwm):] {
		if trit != 0 {
			return false, nil
		}
	}
	return true, nil
}
230458
func NewTransaction(txID string, txValidationCode pb.TxValidationCode, headerType cb.HeaderType) *TxInfo {
	return &TxInfo{
		TxID:             txID,
		TxValidationCode: txValidationCode,
		HeaderType:       headerType,
	}
}
868674
func (v *Xtruct2) GetByteThing() (o int8) {
	if v != nil && v.ByteThing != nil {
		return *v.ByteThing
	}

	return
}