Merge pull request #973 from bas-vk/issue972

Introduced default unlock duration when an account is unlocked from t…
This commit is contained in:
Jeffrey Wilcke
2015-05-14 05:48:31 -07:00
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"strconv"
"time"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/compiler"
@ -374,6 +375,10 @@ func (js *jsre) unlock(call otto.FunctionCall) otto.Value {
fmt.Println(err)
return otto.FalseValue()
}
if seconds == 0 {
seconds = accounts.DefaultAccountUnlockDuration
}
arg := call.Argument(1)
var passphrase string
if arg.IsUndefined() {