tendermint/rpc/core/names.go

17 lines
375 B
Go
Raw Normal View History

2015-05-22 14:03:22 -07:00
package core
import (
"fmt"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)
func NameRegEntry(name string) (*ctypes.ResponseNameRegEntry, error) {
2015-05-22 14:03:22 -07:00
st := consensusState.GetState() // performs a copy
entry := st.GetNameRegEntry(name)
if entry == nil {
return nil, fmt.Errorf("Name %s not found", name)
}
return &ctypes.ResponseNameRegEntry{entry}, nil
}