aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-11 08:08:42 +0800
committerobscuren <geffobscura@gmail.com>2015-03-11 08:08:42 +0800
commit7e0ccc9de53e788ddc1879248bceb33a9ccdbae0 (patch)
tree816ff2e06aaa78721a22eee7f2c8493fbf313fb4 /core
parentce595b9266d658a5eae626d78aec7f47c04222ca (diff)
parenteba4f389a6c494bc3e15b3bbc6516b51a5e61236 (diff)
downloaddexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar.gz
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar.bz2
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar.lz
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar.xz
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.tar.zst
dexon-7e0ccc9de53e788ddc1879248bceb33a9ccdbae0.zip
Merge branch 'develop' into rpcfrontier
Conflicts: rpc/api.go rpc/args.go
Diffstat (limited to 'core')
-rw-r--r--core/chain_manager_test.go2
-rw-r--r--core/helper_test.go2
-rw-r--r--core/manager.go2
-rw-r--r--core/state_transition.go4
-rw-r--r--core/types/transaction.go8
5 files changed, 9 insertions, 9 deletions
diff --git a/core/chain_manager_test.go b/core/chain_manager_test.go
index e78c2e980..91822f9e2 100644
--- a/core/chain_manager_test.go
+++ b/core/chain_manager_test.go
@@ -12,14 +12,12 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/rlp"
)
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
- ethutil.ReadConfig("/tmp/ethtest", "/tmp/ethtest", "ETH")
}
// Test fork of length N starting from block i
diff --git a/core/helper_test.go b/core/helper_test.go
index 473576e3f..36d9e70a8 100644
--- a/core/helper_test.go
+++ b/core/helper_test.go
@@ -62,8 +62,6 @@ func (tm *TestManager) Db() ethutil.Database {
}
func NewTestManager() *TestManager {
- ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "ETH")
-
db, err := ethdb.NewMemDatabase()
if err != nil {
fmt.Println("Could not create mem-db, failing")
diff --git a/core/manager.go b/core/manager.go
index 803069377..c4052cc05 100644
--- a/core/manager.go
+++ b/core/manager.go
@@ -1,7 +1,6 @@
package core
import (
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/p2p"
@@ -14,7 +13,6 @@ type Backend interface {
PeerCount() int
IsListening() bool
Peers() []*p2p.Peer
- KeyManager() *crypto.KeyManager
BlockDb() ethutil.Database
StateDb() ethutil.Database
EventMux() *event.TypeMux
diff --git a/core/state_transition.go b/core/state_transition.go
index f54acd6ee..9b67de149 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -45,8 +45,6 @@ type StateTransition struct {
}
type Message interface {
- Hash() []byte
-
From() []byte
To() []byte
@@ -153,7 +151,7 @@ func (self *StateTransition) preCheck() (err error) {
}
func (self *StateTransition) TransitionState() (ret []byte, err error) {
- statelogger.Debugf("(~) %x\n", self.msg.Hash())
+ // statelogger.Debugf("(~) %x\n", self.msg.Hash())
// XXX Transactions after this point are considered valid.
if err = self.preCheck(); err != nil {
diff --git a/core/types/transaction.go b/core/types/transaction.go
index 7a1d6104e..7d34c86f4 100644
--- a/core/types/transaction.go
+++ b/core/types/transaction.go
@@ -129,6 +129,7 @@ func (tx *Transaction) sender() []byte {
return crypto.Sha3(pubkey[1:])[12:]
}
+// TODO: deprecate after new accounts & key stores are integrated
func (tx *Transaction) Sign(privk []byte) error {
sig := tx.Signature(privk)
@@ -140,6 +141,13 @@ func (tx *Transaction) Sign(privk []byte) error {
return nil
}
+func (tx *Transaction) SetSignatureValues(sig []byte) error {
+ tx.R = sig[:32]
+ tx.S = sig[32:64]
+ tx.V = uint64(sig[64] + 27)
+ return nil
+}
+
func (tx *Transaction) SignECDSA(key *ecdsa.PrivateKey) error {
return tx.Sign(crypto.FromECDSA(key))
}