Skip to content

Commit

Permalink
vspd: Americanize "cancelled".
Browse files Browse the repository at this point in the history
Consistent with the go stdlib (e.g. context.Canceled).
  • Loading branch information
jholdstock committed Sep 13, 2023
1 parent 8038a0e commit 17fe1d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/vspd/spentticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (v *vspd) findSpentTickets(ctx context.Context, toCheck database.TicketList
spent := make([]spentTicket, 0)

for iHeight := startHeight; iHeight <= endHeight; iHeight++ {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return nil, 0, context.Canceled
}
Expand Down
16 changes: 8 additions & 8 deletions cmd/vspd/vspd.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (v *vspd) run() int {
defer v.dcrd.Close()
defer v.wallets.Close()

// Create a context that is cancelled when a shutdown request is received
// Create a context that is canceled when a shutdown request is received
// through an interrupt signal.
ctx := shutdownListener(v.log)

Expand Down Expand Up @@ -350,7 +350,7 @@ func (v *vspd) blockConnected(ctx context.Context) {
}

for _, ticket := range unconfirmed {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down Expand Up @@ -409,7 +409,7 @@ func (v *vspd) blockConnected(ctx context.Context) {
}

for _, ticket := range pending {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down Expand Up @@ -450,7 +450,7 @@ func (v *vspd) blockConnected(ctx context.Context) {
}

for _, ticket := range unconfirmedFees {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down Expand Up @@ -580,7 +580,7 @@ func (v *vspd) blockConnected(ctx context.Context) {
v.lastScannedBlock = endHeight

for _, spentTicket := range spent {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down Expand Up @@ -650,7 +650,7 @@ func (v *vspd) checkWalletConsistency(ctx context.Context) {

// Iterate over each wallet and add any missing tickets.
for _, walletClient := range walletClients {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down Expand Up @@ -713,7 +713,7 @@ func (v *vspd) checkWalletConsistency(ctx context.Context) {
// all wallets.

for _, walletClient := range walletClients {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand All @@ -727,7 +727,7 @@ func (v *vspd) checkWalletConsistency(ctx context.Context) {
}

for _, dbTicket := range votableTickets {
// Exit early if context has been cancelled.
// Exit early if context has been canceled.
if ctx.Err() != nil {
return
}
Expand Down

0 comments on commit 17fe1d7

Please sign in to comment.