Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
5dd24628
Commit
5dd24628
authored
Aug 26, 2015
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc/api - remove personal.deleteAccount from RPC interface
parent
abce0995
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
47 deletions
+0
-47
personal.go
rpc/api/personal.go
+0
-16
personal_args.go
rpc/api/personal_args.go
+0
-30
utils.go
rpc/api/utils.go
+0
-1
No files found.
rpc/api/personal.go
View file @
5dd24628
...
...
@@ -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
{
...
...
rpc/api/personal_args.go
View file @
5dd24628
...
...
@@ -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
...
...
rpc/api/utils.go
View file @
5dd24628
...
...
@@ -118,7 +118,6 @@ var (
"personal"
:
[]
string
{
"listAccounts"
,
"newAccount"
,
"deleteAccount"
,
"unlockAccount"
,
},
"shh"
:
[]
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment