Skip to content

Commit

Permalink
refactor: rm comment and update interface input
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Nov 1, 2024
1 parent 5b0d1c6 commit 61a4c3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions api/clients/accountant.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (
var minNumBins uint32 = 3
var requiredQuorums = []uint8{0, 1}

type IAccountant interface {
AccountBlob(ctx context.Context, data []byte, quorums []uint8) (uint32, uint64, error)
type Accountant interface {
AccountBlob(ctx context.Context, numSymbols uint64, quorums []uint8) (*commonpb.PaymentHeader, []byte, error)
}

var _ Accountant = &accountant{}

type accountant struct {
// on-chain states
reservation *core.ActiveReservation
Expand Down
4 changes: 2 additions & 2 deletions api/clients/disperser_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type disperserClient struct {
conn *grpc.ClientConn
client disperser_rpc.DisperserClient

accountant *Accountant
accountant Accountant
}

var _ DisperserClient = &disperserClient{}
Expand All @@ -106,7 +106,7 @@ var _ DisperserClient = &disperserClient{}
//
// // Subsequent calls will use the existing connection
// status2, requestId2, err := client.DisperseBlob(ctx, otherData, otherQuorums)
func NewDisperserClient(config *Config, signer core.BlobRequestSigner, accountant *Accountant) (*disperserClient, error) {
func NewDisperserClient(config *Config, signer core.BlobRequestSigner, accountant Accountant) (*disperserClient, error) {
if err := checkConfigAndSetDefaults(config); err != nil {
return nil, fmt.Errorf("invalid config: %w", err)
}
Expand Down

0 comments on commit 61a4c3b

Please sign in to comment.