Skip to content

Commit

Permalink
comment on the counter
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Nov 15, 2022
1 parent b2e0bd4 commit 3a24301
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ func (bs *BadgerStorage) WriteSignRequest(assignor, watcher []byte) (time.Time,
} else if cb != nil {
counter = int(binary.BigEndian.Uint64(cb))
} else {
// counter means the number of key an identity has used in the node, thus
// the first counter returned is 1 after an identity assignor created.
// counter is only increased whenever a new key created, i.e. WriteAssignee
counter = 1
}

Expand Down

0 comments on commit 3a24301

Please sign in to comment.