Skip to content

Commit

Permalink
refactor: review
Browse files Browse the repository at this point in the history
  • Loading branch information
nugaon committed Sep 28, 2023
1 parent c53032d commit 84efd85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/bmt/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Proof struct {
// Hash overrides base hash function of Hasher to fill buffer with zeros until chunk length
func (p Prover) Hash(b []byte) ([]byte, error) {
for i := p.size; i < p.maxSize; i += len(zerosection) {
_, err := p.Write(zerosection)
_, err := p.Hasher.Write(zerosection)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/storageincentives/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ type SampleWithProofs struct {
Duration time.Duration `json:"duration"`
}

// Only called by rchash API
// SampleWithProofs is called only by rchash API
func (a *Agent) SampleWithProofs(
ctx context.Context,
anchor1 []byte,
Expand Down
4 changes: 2 additions & 2 deletions pkg/storageincentives/redistribution/inclusionproof.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ type SOCProof struct {
ChunkAddr common.Hash `json:"chunkAddr"`
}

// Transforms arguments to ChunkInclusionProof object
func NewChunkInclusionProof(proofp1, proofp2 bmt.Proof, proofp3 bmt.Proof, sampleItem storer.SampleItem) (ChunkInclusionProof, error) {
// NewChunkInclusionProof transforms arguments to ChunkInclusionProof object
func NewChunkInclusionProof(proofp1, proofp2, proofp3 bmt.Proof, sampleItem storer.SampleItem) (ChunkInclusionProof, error) {
socProof, err := makeSOCProof(sampleItem)
if err != nil {
return ChunkInclusionProof{}, err
Expand Down

0 comments on commit 84efd85

Please sign in to comment.