Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjit-bhat committed Dec 23, 2024
1 parent 679e684 commit 2f6720b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kt/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ type Client struct {
nextEpoch uint64
}

// ClientErr abstracts errors in the KT client.
// maybe there's an error. if so, maybe there's irrefutable evidence.
// ClientErr abstracts errors that potentially have irrefutable evidence.
type ClientErr struct {
Evid *Evid
Err bool
Expand Down Expand Up @@ -104,6 +103,11 @@ func (c *Client) Put(pk []byte) (uint64, *ClientErr) {
if err1.Err {
return 0, err1
}
// TODO: might be able to use same <= freshness check as Get / SelfMon.
// = case with two puts is mathematically ruled out:
// e.g., first put: [M v1; NM v2]. second put: [M v2; NM v3].
// altho maybe selfmon wouldn't work bc can no longer say "up thru
// this epoch". the latest epoch might change, as per the put allowance.
if dig.Epoch < c.nextEpoch {
return 0, stdErr
}
Expand Down

0 comments on commit 2f6720b

Please sign in to comment.