mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 14:06:45 +01:00
Change coinbase to be the address not public key
This commit is contained in:
@@ -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()
|
||||
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user