aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/keystore
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-09 02:25:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-13 20:00:09 +0800
commit205ea9580215cca4093dff22ec61222bc3a6ff96 (patch)
treeaf6c38683d64bb47c0a31ba166533701cf95ed15 /accounts/keystore
parentc5215fdd48231622dd56aba63a5187c6e42828d4 (diff)
downloadgo-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.gz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.bz2
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.lz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.xz
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.tar.zst
go-tangerine-205ea9580215cca4093dff22ec61222bc3a6ff96.zip
accounts, cmd, internal, node: implement HD wallet self-derivation
Diffstat (limited to 'accounts/keystore')
-rw-r--r--accounts/keystore/keystore_wallet.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/accounts/keystore/keystore_wallet.go b/accounts/keystore/keystore_wallet.go
index 7d5507a4f..7165d2821 100644
--- a/accounts/keystore/keystore_wallet.go
+++ b/accounts/keystore/keystore_wallet.go
@@ -19,6 +19,7 @@ package keystore
import (
"math/big"
+ ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/core/types"
)
@@ -69,10 +70,14 @@ func (w *keystoreWallet) Contains(account accounts.Account) bool {
// Derive implements accounts.Wallet, but is a noop for plain wallets since there
// is no notion of hierarchical account derivation for plain keystore accounts.
-func (w *keystoreWallet) Derive(path string, pin bool) (accounts.Account, error) {
+func (w *keystoreWallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Account, error) {
return accounts.Account{}, accounts.ErrNotSupported
}
+// SelfDerive implements accounts.Wallet, but is a noop for plain wallets since
+// there is no notion of hierarchical account derivation for plain keystore accounts.
+func (w *keystoreWallet) SelfDerive(base accounts.DerivationPath, chain ethereum.ChainStateReader) {}
+
// SignHash implements accounts.Wallet, attempting to sign the given hash with
// the given account. If the wallet does not wrap this particular account, an
// error is returned to avoid account leakage (even though in theory we may be