Merge #121: Pass stream isolation through to namecoind

86b9348 Pass stream isolation through to namecoind (JeremyRand)

Pull request description:

ACKs for commit 86b934:

Tree-SHA512: ae1468d446344f2681b55ed0bae20c1d7c98e687b024c75fb304ef433ac2faf75ef0d2e933401010fe5d963a9b6ea7c0bcbb83730fe047c6c5aafd411eeabe13
pull/106/head
JeremyRand 5 years ago
commit 96d897a651
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