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
4811409e
Commit
4811409e
authored
Dec 18, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2084 from bas-vk/rpcnilptr
console crash on nil ptr
parents
fd69d2b7
3c9a2c75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
js.go
cmd/geth/js.go
+6
-5
No files found.
cmd/geth/js.go
View file @
4811409e
...
@@ -341,11 +341,12 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
...
@@ -341,11 +341,12 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
// Override the unlockAccount and newAccount methods on the personal object since these require user interaction.
// Override the unlockAccount and newAccount methods on the personal object since these require user interaction.
// Assign the jeth.unlockAccount and jeth.newAccount in the jsre the original web3 callbacks. These will be called
// Assign the jeth.unlockAccount and jeth.newAccount in the jsre the original web3 callbacks. These will be called
// by the jeth.* methods after they got the password from the user and send the original web3 request to the backend.
// by the jeth.* methods after they got the password from the user and send the original web3 request to the backend.
persObj
:=
p
.
Object
()
if
persObj
:=
p
.
Object
();
persObj
!=
nil
{
// make sure the personal api is enabled over the interface
js
.
re
.
Run
(
`jeth.unlockAccount = personal.unlockAccount;`
)
js
.
re
.
Run
(
`jeth.unlockAccount = personal.unlockAccount;`
)
persObj
.
Set
(
"unlockAccount"
,
jeth
.
UnlockAccount
)
persObj
.
Set
(
"unlockAccount"
,
jeth
.
UnlockAccount
)
js
.
re
.
Run
(
`jeth.newAccount = personal.newAccount;`
)
js
.
re
.
Run
(
`jeth.newAccount = personal.newAccount;`
)
persObj
.
Set
(
"newAccount"
,
jeth
.
NewAccount
)
persObj
.
Set
(
"newAccount"
,
jeth
.
NewAccount
)
}
return
nil
return
nil
}
}
...
...
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