diff --git a/api/clients/v2/disperser_client.go b/api/clients/v2/disperser_client.go index f62b5cc90..62a977dba 100644 --- a/api/clients/v2/disperser_client.go +++ b/api/clients/v2/disperser_client.go @@ -3,13 +3,11 @@ package clients import ( "context" "fmt" - "math/big" "sync" "github.com/Layr-Labs/eigenda/api" disperser_rpc "github.com/Layr-Labs/eigenda/api/grpc/disperser/v2" "github.com/Layr-Labs/eigenda/core" - "github.com/Layr-Labs/eigenda/core/meterer" corev2 "github.com/Layr-Labs/eigenda/core/v2" dispv2 "github.com/Layr-Labs/eigenda/disperser/common/v2" "github.com/Layr-Labs/eigenda/encoding" @@ -83,27 +81,7 @@ func NewDisperserClient(config *DisperserClientConfig, signer corev2.BlobRequest if err != nil { return nil, fmt.Errorf("error getting signer's account ID: %w", err) } - // accountant = DummyAccountant(accountID) - accountant = &Accountant{ - accountID: accountID, - reservation: &core.ReservedPayment{ - SymbolsPerSecond: 0, - StartTimestamp: 0, - EndTimestamp: 0, - QuorumNumbers: []uint8{}, - QuorumSplits: []byte{}, - }, - onDemand: &core.OnDemandPayment{ - CumulativePayment: big.NewInt(0), - }, - reservationWindow: 0, - pricePerSymbol: 0, - minNumSymbols: 0, - binRecords: make([]BinRecord, 3), - usageLock: sync.Mutex{}, - cumulativePayment: big.NewInt(0), - numBins: uint32(meterer.MinNumBins), - } + accountant = DummyAccountant(accountID) } return &disperserClient{ @@ -259,28 +237,23 @@ func (c *disperserClient) GetBlobStatus(ctx context.Context, blobKey corev2.Blob func (c *disperserClient) GetPaymentState(ctx context.Context) (*disperser_rpc.GetPaymentStateReply, error) { err := c.initOnceGrpcConnection() if err != nil { - fmt.Println(err.Error()) return nil, api.NewErrorInternal(err.Error()) } accountID, err := c.signer.GetAccountID() if err != nil { - fmt.Println(err.Error()) return nil, fmt.Errorf("error getting signer's account ID: %w", err) } signature, err := c.signer.SignPaymentStateRequest() if err != nil { - fmt.Println(err.Error()) return nil, fmt.Errorf("error signing payment state request: %w", err) } - fmt.Println("build request") request := &disperser_rpc.GetPaymentStateRequest{ AccountId: accountID, Signature: signature, } - fmt.Println("built request", accountID, signature) return c.client.GetPaymentState(ctx, request) } diff --git a/core/meterer/offchain_store.go b/core/meterer/offchain_store.go index e6aeb3740..1f0eba6b1 100644 --- a/core/meterer/offchain_store.go +++ b/core/meterer/offchain_store.go @@ -296,7 +296,6 @@ func (s *OffchainStore) GetLargestCumulativePayment(ctx context.Context, account return nil, fmt.Errorf("failed to query payments for account: %w", err) } - fmt.Println("Get largest cumulative payment", payments) if len(payments) == 0 { return big.NewInt(0), nil } diff --git a/core/meterer/onchain_state.go b/core/meterer/onchain_state.go index 9476374f4..6a58f9d2c 100644 --- a/core/meterer/onchain_state.go +++ b/core/meterer/onchain_state.go @@ -2,7 +2,6 @@ package meterer import ( "context" - "fmt" "sync" "sync/atomic" @@ -145,7 +144,6 @@ func (pcs *OnchainPaymentState) GetReservedPaymentByAccount(ctx context.Context, pcs.ReservationsLock.Lock() defer pcs.ReservationsLock.Unlock() if reservation, ok := (pcs.ReservedPayments)[accountID]; ok { - fmt.Println("found reservation in cache", accountID) return reservation, nil }