accounts/abi: fixed string and fixed size bytes packing

This commit is contained in:
Jeffrey Wilcke
2016-04-20 21:30:02 +02:00
parent c3d5250473
commit 4880868c88
6 changed files with 138 additions and 86 deletions

View File

@ -59,7 +59,7 @@ func packElement(t Type, reflectValue reflect.Value) []byte {
reflectValue = mustArrayToByteSlice(reflectValue)
}
return common.LeftPadBytes(reflectValue.Bytes(), 32)
return common.RightPadBytes(reflectValue.Bytes(), 32)
}
panic("abi: fatal error")
}