Skip to content

Commit

Permalink
fix: asd
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Oct 30, 2024
1 parent 259e17e commit dc8d120
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/storer/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,18 @@ func transformedAddressCAC(hasher *bmt.Hasher, chunk swarm.Chunk) (swarm.Address

func transformedAddressSOC(hasher *bmt.Hasher, socChunk swarm.Chunk) (swarm.Address, error) {
// Calculate transformed address from wrapped chunk
chunk, err := soc.UnwrapCAC(socChunk)
cacChunk, err := soc.UnwrapCAC(socChunk)
if err != nil {
return swarm.ZeroAddress, err
}
taddrCac, err := transformedAddressCAC(hasher, chunk)
taddrCac, err := transformedAddressCAC(hasher, cacChunk)
if err != nil {
return swarm.ZeroAddress, err
}

// Hash address and transformed address to make transformed address for this SOC
sHasher := swarm.NewHasher()
if _, err := sHasher.Write(chunk.Address().Bytes()); err != nil {
if _, err := sHasher.Write(socChunk.Address().Bytes()); err != nil {
return swarm.ZeroAddress, err
}
if _, err := sHasher.Write(taddrCac.Bytes()); err != nil {
Expand Down

0 comments on commit dc8d120

Please sign in to comment.