aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-03-02 20:57:15 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:56:49 +0800
commit85e6c40c0081bd0db80448640db648887804010c (patch)
tree326a2c3bc115a445b481624cb20f00b28e44f92a /eth
parentdff9b4246f3ef9e6c254b57eef6d0433809f16b9 (diff)
downloaddexon-85e6c40c0081bd0db80448640db648887804010c.tar
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.gz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.bz2
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.lz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.xz
dexon-85e6c40c0081bd0db80448640db648887804010c.tar.zst
dexon-85e6c40c0081bd0db80448640db648887804010c.zip
accounts, crypto: move keystore to package accounts
The account management API was originally implemented as a thin layer around crypto.KeyStore, on the grounds that several kinds of key stores would be implemented later on. It turns out that this won't happen so KeyStore is a superflous abstraction. In this commit crypto.KeyStore and everything related to it moves to package accounts and is unexported.
Diffstat (limited to 'eth')
-rw-r--r--eth/helper_test.go6
-rw-r--r--eth/protocol_test.go3
2 files changed, 4 insertions, 5 deletions
diff --git a/eth/helper_test.go b/eth/helper_test.go
index 13de18670..d6392f531 100644
--- a/eth/helper_test.go
+++ b/eth/helper_test.go
@@ -4,6 +4,7 @@
package eth
import (
+ "crypto/ecdsa"
"crypto/rand"
"math/big"
"sync"
@@ -94,10 +95,9 @@ func (p *testTxPool) GetTransactions() types.Transactions {
}
// newTestTransaction create a new dummy transaction.
-func newTestTransaction(from *crypto.Key, nonce uint64, datasize int) *types.Transaction {
+func newTestTransaction(from *ecdsa.PrivateKey, nonce uint64, datasize int) *types.Transaction {
tx := types.NewTransaction(nonce, common.Address{}, big.NewInt(0), big.NewInt(100000), big.NewInt(0), make([]byte, datasize))
- tx, _ = tx.SignECDSA(from.PrivateKey)
-
+ tx, _ = tx.SignECDSA(from)
return tx
}
diff --git a/eth/protocol_test.go b/eth/protocol_test.go
index 372c7e203..cac3657e7 100644
--- a/eth/protocol_test.go
+++ b/eth/protocol_test.go
@@ -17,7 +17,6 @@
package eth
import (
- "crypto/rand"
"fmt"
"sync"
"testing"
@@ -35,7 +34,7 @@ func init() {
// glog.SetV(6)
}
-var testAccount = crypto.NewKey(rand.Reader)
+var testAccount, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
// Tests that handshake failures are detected and reported correctly.
func TestStatusMsgErrors61(t *testing.T) { testStatusMsgErrors(t, 61) }