Minor fixed and additions for block proc

* Path check length
* Genesis include TD
* Output TD on last block
This commit is contained in:
obscuren
2015-01-08 16:37:06 +01:00
parent db4aaedcbd
commit b25126a277
4 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@ func ExpandHomePath(p string) (path string) {
path = p
// Check in case of paths like "/something/~/something/"
if path[:2] == "~/" {
if len(path) > 1 && path[:2] == "~/" {
usr, _ := user.Current()
dir := usr.HomeDir

View File

@ -137,7 +137,7 @@ func Encode(object interface{}) []byte {
case byte:
buff.Write(Encode(big.NewInt(int64(t))))
case *big.Int:
// Not sure how this is possible while we check for
// Not sure how this is possible while we check for nil
if t == nil {
buff.WriteByte(0xc0)
} else {