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
ff87c241
Commit
ff87c241
authored
May 14, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #973 from bas-vk/issue972
Introduced default unlock duration when an account is unlocked from t…
parents
7fa74099
1fa48bc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
account_manager.go
accounts/account_manager.go
+5
-0
admin.go
cmd/geth/admin.go
+5
-0
No files found.
accounts/account_manager.go
View file @
ff87c241
...
@@ -49,6 +49,11 @@ var (
...
@@ -49,6 +49,11 @@ var (
ErrNoKeys
=
errors
.
New
(
"no keys in store"
)
ErrNoKeys
=
errors
.
New
(
"no keys in store"
)
)
)
const
(
// Default unlock duration (in seconds) when an account is unlocked from the console
DefaultAccountUnlockDuration
=
300
)
type
Account
struct
{
type
Account
struct
{
Address
common
.
Address
Address
common
.
Address
}
}
...
...
cmd/geth/admin.go
View file @
ff87c241
...
@@ -8,6 +8,7 @@ import (
...
@@ -8,6 +8,7 @@ import (
"strconv"
"strconv"
"time"
"time"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/compiler"
"github.com/ethereum/go-ethereum/common/compiler"
...
@@ -374,6 +375,10 @@ func (js *jsre) unlock(call otto.FunctionCall) otto.Value {
...
@@ -374,6 +375,10 @@ func (js *jsre) unlock(call otto.FunctionCall) otto.Value {
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
return
otto
.
FalseValue
()
return
otto
.
FalseValue
()
}
}
if
seconds
==
0
{
seconds
=
accounts
.
DefaultAccountUnlockDuration
}
arg
:=
call
.
Argument
(
1
)
arg
:=
call
.
Argument
(
1
)
var
passphrase
string
var
passphrase
string
if
arg
.
IsUndefined
()
{
if
arg
.
IsUndefined
()
{
...
...
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