aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-08-26 17:39:43 +0800
committerBas van Kervel <bas@ethdev.com>2015-08-26 17:39:43 +0800
commit5dd2462816c007b13590e7d9ab0bc8b02b027439 (patch)
tree0e025c9437108eb59f8e25411df32601b189ddd7 /rpc
parentabce09954b6901b446c004ee06b389c338922f28 (diff)
downloadgo-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar.gz
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar.bz2
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar.lz
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar.xz
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.tar.zst
go-tangerine-5dd2462816c007b13590e7d9ab0bc8b02b027439.zip
rpc/api - remove personal.deleteAccount from RPC interface
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api/personal.go16
-rw-r--r--rpc/api/personal_args.go30
-rw-r--r--rpc/api/utils.go1
3 files changed, 0 insertions, 47 deletions
diff --git a/rpc/api/personal.go b/rpc/api/personal.go
index 6c73ac83d..1b0dea330 100644
--- a/rpc/api/personal.go
+++ b/rpc/api/personal.go
@@ -36,7 +36,6 @@ var (
personalMapping = map[string]personalhandler{
"personal_listAccounts": (*personalApi).ListAccounts,
"personal_newAccount": (*personalApi).NewAccount,
- "personal_deleteAccount": (*personalApi).DeleteAccount,
"personal_unlockAccount": (*personalApi).UnlockAccount,
}
)
@@ -105,21 +104,6 @@ func (self *personalApi) NewAccount(req *shared.Request) (interface{}, error) {
return acc.Address.Hex(), err
}
-func (self *personalApi) DeleteAccount(req *shared.Request) (interface{}, error) {
- args := new(DeleteAccountArgs)
- if err := self.codec.Decode(req.Params, &args); err != nil {
- return nil, shared.NewDecodeParamError(err.Error())
- }
-
- addr := common.HexToAddress(args.Address)
- am := self.ethereum.AccountManager()
- if err := am.DeleteAccount(addr, args.Passphrase); err == nil {
- return true, nil
- } else {
- return false, err
- }
-}
-
func (self *personalApi) UnlockAccount(req *shared.Request) (interface{}, error) {
args := new(UnlockAccountArgs)
if err := self.codec.Decode(req.Params, &args); err != nil {
diff --git a/rpc/api/personal_args.go b/rpc/api/personal_args.go
index 5a584fb0c..89419029b 100644
--- a/rpc/api/personal_args.go
+++ b/rpc/api/personal_args.go
@@ -44,36 +44,6 @@ func (args *NewAccountArgs) UnmarshalJSON(b []byte) (err error) {
return shared.NewInvalidTypeError("passhrase", "not a string")
}
-type DeleteAccountArgs struct {
- Address string
- Passphrase string
-}
-
-func (args *DeleteAccountArgs) UnmarshalJSON(b []byte) (err error) {
- var obj []interface{}
- if err := json.Unmarshal(b, &obj); err != nil {
- return shared.NewDecodeParamError(err.Error())
- }
-
- if len(obj) < 2 {
- return shared.NewInsufficientParamsError(len(obj), 2)
- }
-
- if addr, ok := obj[0].(string); ok {
- args.Address = addr
- } else {
- return shared.NewInvalidTypeError("address", "not a string")
- }
-
- if passhrase, ok := obj[1].(string); ok {
- args.Passphrase = passhrase
- } else {
- return shared.NewInvalidTypeError("passhrase", "not a string")
- }
-
- return nil
-}
-
type UnlockAccountArgs struct {
Address string
Passphrase string
diff --git a/rpc/api/utils.go b/rpc/api/utils.go
index 50c607d16..5072dc2cd 100644
--- a/rpc/api/utils.go
+++ b/rpc/api/utils.go
@@ -118,7 +118,6 @@ var (
"personal": []string{
"listAccounts",
"newAccount",
- "deleteAccount",
"unlockAccount",
},
"shh": []string{