From 7c4e8dfce76e914fa0979c667cf778c99748f23d Mon Sep 17 00:00:00 2001 From: jholdstock Date: Tue, 26 Sep 2023 09:58:38 +0100 Subject: [PATCH] vspd: Improve comment for update func. A good comment explains what a function does, not when it is called. --- internal/vspd/update.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/vspd/update.go b/internal/vspd/update.go index 6d3d46a8..b0ca288a 100644 --- a/internal/vspd/update.go +++ b/internal/vspd/update.go @@ -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" @@ -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