Skip to content

Commit

Permalink
vspd: Improve comment for update func.
Browse files Browse the repository at this point in the history
A good comment explains what a function does, not when it is called.
  • Loading branch information
jholdstock committed Sep 26, 2023
1 parent 0b716f3 commit 7c4e8df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/vspd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import (
"github.com/jrick/wsrpc/v2"
)

// update is called once when vspd starts up, and once each time a
// blockconnected notification is received from dcrd.
// update uses the latest available information from dcrd to update all of the
// data in the vspd database. When appropriate it will also broadcast pending
// fee transactions and add tickets to voting wallets.
func (v *Vspd) update(ctx context.Context) {
const funcName = "update"

Expand Down Expand Up @@ -44,7 +45,8 @@ func (v *Vspd) update(ctx context.Context) {
return
}

// Step 4/4: Set ticket outcome in database if any tickets are voted/revoked.
// Step 4/4: Set ticket outcome in database if any tickets are
// voted/revoked.
v.setOutcomes(ctx, dcrdClient)
if ctx.Err() != nil {
return
Expand Down

0 comments on commit 7c4e8df

Please sign in to comment.