Moving over to ethpipe

This commit is contained in:
obscuren
2014-08-15 13:16:07 +02:00
parent c362172567
commit a6c4543c57
12 changed files with 65 additions and 107 deletions

View File

@ -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()