Running contracts fixed
This commit is contained in:
@ -35,3 +35,9 @@ func BigD(data []byte) *big.Int {
|
||||
|
||||
return n
|
||||
}
|
||||
|
||||
func BigToBytes(num *big.Int, base int) []byte {
|
||||
ret := make([]byte, base/8)
|
||||
|
||||
return append(ret[:len(ret)-len(num.Bytes())], num.Bytes()...)
|
||||
}
|
||||
|
@ -34,12 +34,14 @@ func ReadConfig(base string) *config {
|
||||
usr, _ := user.Current()
|
||||
path := path.Join(usr.HomeDir, base)
|
||||
|
||||
//Check if the logging directory already exists, create it if not
|
||||
_, err := os.Stat(path)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
log.Printf("Debug logging directory %s doesn't exist, creating it", path)
|
||||
os.Mkdir(path, 0777)
|
||||
if len(base) > 0 {
|
||||
//Check if the logging directory already exists, create it if not
|
||||
_, err := os.Stat(path)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
log.Printf("Debug logging directory %s doesn't exist, creating it", path)
|
||||
os.Mkdir(path, 0777)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,10 @@ func (t *Trie) Undo() {
|
||||
t.Root = t.prevRoot
|
||||
}
|
||||
|
||||
func (t *Trie) Cache() *Cache {
|
||||
return t.cache
|
||||
}
|
||||
|
||||
/*
|
||||
* Public (query) interface functions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user