Minor fixed and additions for block proc
* Path check length * Genesis include TD * Output TD on last block
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user