OSDN Git Service

Remove rpc updateAlias (#84)
authorBlockmeta-区块元 <blockmeta@8btc.com>
Fri, 3 Nov 2017 06:17:51 +0000 (14:17 +0800)
committerGuanghua Guo <1536310027@qq.com>
Fri, 3 Nov 2017 06:17:51 +0000 (14:17 +0800)
remove rpc updateAlias  for  alias should be unchangable

blockchain/hsm.go
blockchain/reactor.go

index b1b8366..e9f8f50 100644 (file)
@@ -101,11 +101,3 @@ func (a *BlockchainReactor) pseudohsmResetPassword(ctx context.Context, x struct
 }) error {
        return a.hsm.ResetPassword(x.XPub, x.OldPassword, x.NewPassword)
 }
-
-func (a *BlockchainReactor) pseudohsmUpdateAlias(ctx context.Context, x struct {
-       Password string
-       NewAlias string
-       XPub     chainkd.XPub `json:"xpubs"`
-}) error {
-       return a.hsm.UpdateAlias(x.XPub, x.Password, x.NewAlias)
-}
index d4893ba..f075b58 100644 (file)
@@ -18,13 +18,13 @@ import (
        "github.com/bytom/blockchain/rpc"
        ctypes "github.com/bytom/blockchain/rpc/types"
        "github.com/bytom/blockchain/txfeed"
-       "github.com/bytom/protocol/bc"
        "github.com/bytom/encoding/json"
        "github.com/bytom/errors"
        "github.com/bytom/mining/cpuminer"
        "github.com/bytom/net/http/httpjson"
        "github.com/bytom/p2p"
        "github.com/bytom/protocol"
+       "github.com/bytom/protocol/bc"
        "github.com/bytom/protocol/bc/legacy"
        "github.com/bytom/types"
 )
@@ -160,7 +160,6 @@ func (bcr *BlockchainReactor) BuildHander() {
        m.Handle("/delete-key", jsonHandler(bcr.pseudohsmDeleteKey))
        m.Handle("/sign-transactions", jsonHandler(bcr.pseudohsmSignTemplates))
        m.Handle("/reset-password", jsonHandler(bcr.pseudohsmResetPassword))
-       m.Handle("/update-alias", jsonHandler(bcr.pseudohsmUpdateAlias))
        m.Handle("/net-info", jsonHandler(bcr.getNetInfo))
        m.Handle("/get-best-block-hash", jsonHandler(bcr.getBestBlockHash))