Pass stream isolation through to namecoind

pull/121/head
JeremyRand 5 years ago
parent 4a1381cd41
commit 86b9348f50
No known key found for this signature in database
GPG Key ID: B3F2D165786D6570

@ -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…
Cancel
Save