Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Sep 26, 2023
1 parent 33e39ee commit 49c8499
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pkg/rpc/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func CheckProverBalance(
return false, err
}

log.Info("prover's deposited taikoTokenBalance", "balance", depositedBalance.String(), "address", prover.Hex())
log.Info("Prover's deposited taikoTokenBalance", "balance", depositedBalance.String(), "address", prover.Hex())

if bond.Cmp(depositedBalance) > 0 {
// Check allowance on taiko token contract
Expand All @@ -63,15 +63,15 @@ func CheckProverBalance(
return false, err
}

log.Info("prover allowance for TaikoL1 contract", "allowance", allowance.String(), "address", prover.Hex())
log.Info("Prover allowance for TaikoL1 contract", "allowance", allowance.String(), "address", prover.Hex())

// Check prover's taiko token balance
balance, err := rpc.TaikoToken.BalanceOf(&bind.CallOpts{Context: ctxWithTimeout}, prover)
if err != nil {
return false, err
}

log.Info("prover's wallet taiko token balance", "balance", balance.String(), "address", prover.Hex())
log.Info("Prover's wallet taiko token balance", "balance", balance.String(), "address", prover.Hex())

if bond.Cmp(allowance) > 0 || bond.Cmp(balance) > 0 {
log.Info(
Expand Down
9 changes: 4 additions & 5 deletions prover/capacity_manager/capacity_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (m *CapacityManager) ReadCapacity() uint64 {
m.mutex.RLock()
defer m.mutex.RUnlock()

log.Info("reading capacity", "capacity", m.capacity)
log.Info("Reading capacity", "capacity", m.capacity)

return m.capacity
}
Expand All @@ -34,7 +34,7 @@ func (m *CapacityManager) ReleaseOneCapacity() uint64 {

m.capacity += 1

log.Info("released capacity", "capacityAfterRelease", m.capacity)
log.Info("Released capacity", "capacityAfterRelease", m.capacity)

return m.capacity
}
Expand All @@ -45,14 +45,13 @@ func (m *CapacityManager) TakeOneCapacity() (uint64, bool) {
defer m.mutex.Unlock()

if m.capacity == 0 {
log.Info("could not take one capacity", "capacity", m.capacity)

log.Info("Could not take one capacity", "capacity", m.capacity)
return 0, false
}

m.capacity -= 1

log.Info("took one capacity", "capacityAfterTaking", m.capacity)
log.Info("Took one capacity", "capacityAfterTaking", m.capacity)

return m.capacity, true
}
6 changes: 4 additions & 2 deletions prover/server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func (srv *ProverServer) CreateAssignment(c echo.Context) error {
}

if req.Fee.Cmp(srv.minProofFee) < 0 {
log.Warn("Proof fee too low",
log.Warn(
"Proof fee too low",
"reqFee", req.Fee.String(),
"srvMinProofFee", srv.minProofFee.String(),
"proposerIP", c.RealIP(),
Expand All @@ -89,7 +90,8 @@ func (srv *ProverServer) CreateAssignment(c echo.Context) error {
}

if req.Expiry > uint64(time.Now().Add(srv.maxExpiry).Unix()) {
log.Warn("Expiry too long",
log.Warn(
"Expiry too long",
"requestExpiry", req.Expiry,
"srvMaxExpiry", srv.maxExpiry,
"proposerIP", c.RealIP(),
Expand Down

0 comments on commit 49c8499

Please sign in to comment.