aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-13 20:48:45 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-13 20:48:45 +0800
commit54eff2d778ef6e8a84d336d4fb14a5a35728340c (patch)
treee09b5ad8798b36088f1a7a25b3cecb119d433d1a
parent20ea78945e751a1ad11e2b2fc7c4224f4c46e108 (diff)
downloaddexon-54eff2d778ef6e8a84d336d4fb14a5a35728340c.tar.gz
dexon-54eff2d778ef6e8a84d336d4fb14a5a35728340c.tar.zst
dexon-54eff2d778ef6e8a84d336d4fb14a5a35728340c.zip
Change coinbase to be the address not public key
-rw-r--r--ethereum/ethereum.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go
index 8b22533d9..babebbb48 100644
--- a/ethereum/ethereum.go
+++ b/ethereum/ethereum.go
@@ -1,6 +1,7 @@
package main
import (
+ "encoding/hex"
"fmt"
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethchain"
@@ -139,7 +140,9 @@ func main() {
keyRing := ethutil.NewValueFromBytes(data)
addr := keyRing.Get(1).Bytes()
- miner := ethminer.NewDefaultMiner(addr, ethereum)
+ pair, _ := ethchain.NewKeyPairFromSec(ethutil.FromHex(hex.EncodeToString(addr)))
+
+ miner := ethminer.NewDefaultMiner(pair.Address(), ethereum)
miner.Start()
}()