From 61ccb43487a1d751e20b39d8328cb00994cdf796 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Mon, 28 Nov 2016 21:56:38 +0100 Subject: [PATCH] core/types: Document Transaction.To (#3366) --- core/types/transaction.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/types/transaction.go b/core/types/transaction.go index 1d2b1b561..f566dc365 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -234,6 +234,8 @@ func (tx *Transaction) Value() *big.Int { return new(big.Int).Set(tx.data.Amo func (tx *Transaction) Nonce() uint64 { return tx.data.AccountNonce } func (tx *Transaction) CheckNonce() bool { return true } +// To returns the recipient address of the transaction. +// It returns nil if the transaction is a contract creation. func (tx *Transaction) To() *common.Address { if tx.data.Recipient == nil { return nil