Skip to content

Commit

Permalink
fix: batchstore rewrite gc test changes (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
istae authored Apr 11, 2022
1 parent 1fc5cd2 commit 777025d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 3 additions & 6 deletions pkg/bee/debugapi/postage.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,12 @@ func (p *PostageService) PostageBatch(ctx context.Context, batchID string) (Post
}

type ReserveState struct {
Radius uint8 `json:"radius"`
StorageRadius uint8 `json:"storageRadius"`
Available int64 `json:"available"`
Outer *bigint.BigInt `json:"outer"`
Inner *bigint.BigInt `json:"inner"`
Radius uint8 `json:"radius"`
StorageRadius uint8 `json:"storageRadius"`
}

func (rs ReserveState) String() string {
return fmt.Sprintf("Radius: %d, StorageRadius: %d, Available: %d, Outer: %v, Inner: %v", rs.Radius, rs.StorageRadius, rs.Available, rs.Outer, rs.Inner)
return fmt.Sprintf("Radius: %d, StorageRadius: %d", rs.Radius, rs.StorageRadius)
}

// Returns the batchstore reservestate of the node
Expand Down
3 changes: 0 additions & 3 deletions pkg/check/gc/reserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ func (c *Check) Run(ctx context.Context, cluster orchestration.Cluster, opts int
if origState.StorageRadius != 0 {
return fmt.Errorf("wrong initial storage radius, got %d want %d", origState.StorageRadius, 0)
}
if origState.Available != 16 {
return fmt.Errorf("wrong initial storage radius, got %d want %d", origState.Available, 16)
}

batchID, err := client.CreatePostageBatch(ctx, cheapBatchAmount, batchDepth, o.GasPrice, o.PostageLabel, true)
if err != nil {
Expand Down

0 comments on commit 777025d

Please sign in to comment.