Skip to content

Commit

Permalink
sqlite: remove scan on nonexistent fields
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Dec 16, 2024
1 parent 75118ea commit 17eef5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion persist/sqlite/recalc.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func recalcContractMetrics(tx *txn, log *zap.Logger) error {
var lockedCollateral types.Currency
var usage contracts.Usage

if err := rows.Scan(&status, decode(&lockedCollateral), decode(&usage.RiskedCollateral), decode(&usage.RPCRevenue), decode(&usage.StorageRevenue), decode(&usage.IngressRevenue), decode(&usage.EgressRevenue), decode(&usage.AccountFunding), decode(&usage.RegistryRead), decode(&usage.RegistryWrite)); err != nil {
if err := rows.Scan(&status, decode(&lockedCollateral), decode(&usage.RiskedCollateral), decode(&usage.RPCRevenue), decode(&usage.StorageRevenue), decode(&usage.IngressRevenue), decode(&usage.EgressRevenue), decode(&usage.AccountFunding)); err != nil {
return fmt.Errorf("failed to scan contract: %w", err)
}

Expand Down

0 comments on commit 17eef5a

Please sign in to comment.