浏览代码

core/types: Document Transaction.To (#3366)

Steven Roose 9 年之前
父节点
当前提交
61ccb43487
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core/types/transaction.go

+ 2 - 0
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) Nonce() uint64      { return tx.data.AccountNonce }
 func (tx *Transaction) CheckNonce() bool   { return true }
 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 {
 func (tx *Transaction) To() *common.Address {
 	if tx.data.Recipient == nil {
 	if tx.data.Recipient == nil {
 		return nil
 		return nil