accounts/abi: fix if statements

Signed-off-by: VoR0220 <rj@erisindustries.com>
This commit is contained in:
VoR0220 2016-11-01 13:12:02 -05:00
parent b3e60b857a
commit 1ec212eeba
No known key found for this signature in database
GPG key ID: D4AB109D9B5D6386
3 changed files with 4 additions and 5 deletions

View file

@ -126,8 +126,7 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) {
// reslice to match the required size
slice = slice[:(size * 32)]
}
if t.Type.IsArray {
} else if t.Type.IsArray {
//get the number of elements in the array
size = t.Type.SliceSize
@ -142,6 +141,7 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) {
return nil, fmt.Errorf("abi: cannot marshal in to go slice: insufficient size output %d require %d", len(output), offset+32+size*32)
}
}
for i := 0; i < size; i++ {
var (
inter interface{} // interface type

View file

@ -180,8 +180,7 @@ func (t Type) pack(v reflect.Value) ([]byte, error) {
}
if t.IsSlice {
return packBytesSlice(packed, v.Len()), nil
}
if t.IsArray {
} else if t.IsArray {
return packed, nil
}
}

View file

@ -248,7 +248,7 @@ func (n *Node) openDataDir() error {
// Try to open the instance directory as LevelDB storage. This creates a lock file
// which prevents concurrent use by another instance as well as accidental use of the
// instance directory as a database.
storage, err := storage.OpenFile(instdir, true)
storage, err := storage.OpenFile(instdir)
if err != nil {
return err
}