From a4d7386843f945eef652c6da46af1754d30d7472 Mon Sep 17 00:00:00 2001 From: Andrew Chiw Date: Thu, 17 Oct 2019 17:17:11 +0200 Subject: [PATCH] docs: comments for NameID, ErrWaitTransaction --- aeternity/helpers.go | 2 ++ transactions/tx_aens.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aeternity/helpers.go b/aeternity/helpers.go index b7828bcf..67430856 100644 --- a/aeternity/helpers.go +++ b/aeternity/helpers.go @@ -332,6 +332,8 @@ type getTransactionByHashHeighter interface { naet.GetHeighter } +// ErrWaitTransaction is returned by WaitForTransactionForXBlocks() to let +// callers distinguish between network errors and transaction acceptance errors. type ErrWaitTransaction struct { NetworkErr bool TransactionErr bool diff --git a/transactions/tx_aens.go b/transactions/tx_aens.go index ae51967d..01253cca 100644 --- a/transactions/tx_aens.go +++ b/transactions/tx_aens.go @@ -12,13 +12,13 @@ import ( rlp "github.com/randomshinichi/rlpae" ) +// NameID computes the nm_ string of a given AENS name. func NameID(name string) (nm string, err error) { s, err := binary.Blake2bHash([]byte(name)) if err != nil { return } return binary.Encode(binary.PrefixName, s), nil - } // NamePreclaimTx represents a transaction where one reserves a name on AENS without revealing it yet