mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
accounts/abi: fix if statements
Signed-off-by: VoR0220 <rj@erisindustries.com>
This commit is contained in:
parent
b3e60b857a
commit
1ec212eeba
3 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue