From 042a5cc1c51d840b1dc47d137010a8b7795a5a7c Mon Sep 17 00:00:00 2001 From: Mikelle Date: Mon, 29 Apr 2024 23:42:54 +0200 Subject: [PATCH] fix: whitespace --- p2p/pkg/depositmanager/deposit.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p2p/pkg/depositmanager/deposit.go b/p2p/pkg/depositmanager/deposit.go index 4ab53e3fa..0623a63ad 100644 --- a/p2p/pkg/depositmanager/deposit.go +++ b/p2p/pkg/depositmanager/deposit.go @@ -204,19 +204,19 @@ func (dm *DepositManager) CheckAndDeductDeposit(ctx context.Context, address com if balanceToCheck == nil { balanceToCheck = defaultBalance } - + // Check if the balance is sufficient to cover the bid amount if balanceToCheck != nil && balanceToCheck.Cmp(bidAmount) >= 0 { newBalance = new(big.Int).Sub(balanceToCheck, bidAmount) } else { return nil, status.Errorf(codes.FailedPrecondition, "insufficient balance") } - + if err := dm.store.SetBalanceForBlock(address, newBalance, blockNumber); err != nil { dm.logger.Error("setting balance", "error", err) return nil, status.Errorf(codes.Internal, "failed to set balance: %v", err) } - + return newBalance, nil }