Moving over to ethpipe
This commit is contained in:
14
utils/cmd.go
14
utils/cmd.go
@ -8,6 +8,7 @@ import (
|
||||
"os/signal"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
@ -267,6 +268,19 @@ func StartMining(ethereum *eth.Ethereum) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func FormatTransactionData(data string) []byte {
|
||||
d := ethutil.StringToByteFunc(data, func(s string) (ret []byte) {
|
||||
slice := regexp.MustCompile("\\n|\\s").Split(s, 1000000000)
|
||||
for _, dataItem := range slice {
|
||||
d := ethutil.FormatData(dataItem)
|
||||
ret = append(ret, d...)
|
||||
}
|
||||
return
|
||||
})
|
||||
|
||||
return d
|
||||
}
|
||||
|
||||
func StopMining(ethereum *eth.Ethereum) bool {
|
||||
if ethereum.Mining && miner != nil {
|
||||
miner.Stop()
|
||||
|
Reference in New Issue
Block a user