good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
5dd24628
Commit
5dd24628
authored
9 years ago
by
Bas van Kervel
Browse files
Options
Downloads
Patches
Plain Diff
rpc/api - remove personal.deleteAccount from RPC interface
parent
abce0995
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
rpc/api/personal.go
+0
-16
0 additions, 16 deletions
rpc/api/personal.go
rpc/api/personal_args.go
+0
-30
0 additions, 30 deletions
rpc/api/personal_args.go
rpc/api/utils.go
+0
-1
0 additions, 1 deletion
rpc/api/utils.go
with
0 additions
and
47 deletions
rpc/api/personal.go
+
0
−
16
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
{
...
...
This diff is collapsed.
Click to expand it.
rpc/api/personal_args.go
+
0
−
30
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
...
...
This diff is collapsed.
Click to expand it.
rpc/api/utils.go
+
0
−
1
View file @
5dd24628
...
...
@@ -118,7 +118,6 @@ var (
"personal"
:
[]
string
{
"listAccounts"
,
"newAccount"
,
"deleteAccount"
,
"unlockAccount"
,
},
"shh"
:
[]
string
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment