mirror of
https://github.com/namecoin/ncdns
synced 2024-11-16 00:13:01 +00:00
Pass stream isolation through to namecoind
This commit is contained in:
parent
4a1381cd41
commit
86b9348f50
@ -1,12 +1,11 @@
|
||||
package namecoin
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/namecoin/btcd/btcjson"
|
||||
"github.com/namecoin/btcd/rpcclient"
|
||||
"gopkg.in/hlandau/madns.v2/merr"
|
||||
|
||||
"github.com/namecoin/ncbtcjson"
|
||||
"github.com/namecoin/ncrpcclient"
|
||||
)
|
||||
|
||||
@ -28,12 +27,7 @@ func New(config *rpcclient.ConnConfig, ntfnHandlers *rpcclient.NotificationHandl
|
||||
// NameQuery returns the value of a name. If the name doesn't exist, the error
|
||||
// returned will be merr.ErrNoSuchDomain.
|
||||
func (c *Client) NameQuery(name string, streamIsolationID string) (string, error) {
|
||||
// TODO: Pass stream isolation ID to namecoind, and remove this error
|
||||
if streamIsolationID != "" {
|
||||
return "", fmt.Errorf("Stream isolation ID '%s' is not yet passed to namecoind", streamIsolationID)
|
||||
}
|
||||
|
||||
nameData, err := c.NameShow(name)
|
||||
nameData, err := c.NameShow(name, &ncbtcjson.NameShowOptions{StreamID: streamIsolationID})
|
||||
if err != nil {
|
||||
if jerr, ok := err.(*btcjson.RPCError); ok {
|
||||
if jerr.Code == btcjson.ErrRPCWallet {
|
||||
|
Loading…
Reference in New Issue
Block a user