Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Apply go fmt changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Jul 19, 2019
1 parent 11d947d commit b8e51a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions libraries/shared/factories/storage/transformer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ var _ = Describe("Storage transformer", func() {

Describe("when a storage row contains more than one item packed in storage", func() {
var (
rawValue = common.HexToAddress("000000000000000000000000000000000000000000000002a300000000002a30")
rawValue = common.HexToAddress("000000000000000000000000000000000000000000000002a300000000002a30")
fakeBlockNumber = 123
fakeBlockHash = "0x67890"
packedTypes = make(map[int]utils.ValueType)
fakeBlockHash = "0x67890"
packedTypes = make(map[int]utils.ValueType)
)
packedTypes[0] = utils.Uint48
packedTypes[1] = utils.Uint48
Expand Down Expand Up @@ -135,8 +135,8 @@ var _ = Describe("Storage transformer", func() {
Expect(repository.PassedBlockHash).To(Equal(common.HexToHash(fakeBlockHash).Hex()))
Expect(repository.PassedMetadata).To(Equal(fakeMetadata))
expectedPassedValue := make(map[int]string)
expectedPassedValue[0]= "10800"
expectedPassedValue[1]= "172800"
expectedPassedValue[0] = "10800"
expectedPassedValue[1] = "172800"
Expect(repository.PassedValue.(map[int]string)).To(Equal(expectedPassedValue))
})

Expand Down
4 changes: 2 additions & 2 deletions libraries/shared/storage/utils/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func decodeAddress(raw []byte) string {
return common.BytesToAddress(raw).Hex()
}

func decodePackedSlot(raw []byte, packedTypes map[int]ValueType) map[int]string{
func decodePackedSlot(raw []byte, packedTypes map[int]ValueType) map[int]string {
storageSlot := raw
var results = map[int]string{}

Expand Down Expand Up @@ -93,7 +93,7 @@ func decodeIndividualItems(itemBytes []byte, valueType ValueType) string {
}
}

func getNumberOfBytes(valueType ValueType) int{
func getNumberOfBytes(valueType ValueType) int {
// 8 bits per byte
switch valueType {
case Uint48:
Expand Down

0 comments on commit b8e51a7

Please sign in to comment.