Skip to content

Commit

Permalink
docs: comments for NameID, ErrWaitTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Nov 11, 2019
1 parent 6b4725b commit a4d7386
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions aeternity/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion transactions/tx_aens.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4d7386

Please sign in to comment.