Implement API endpoint to download UTB#10
Conversation
|
|
||
| // LoadLast returns trust base for the latest epoch. | ||
| func (s *TrustBaseStore) LoadLast() (*types.RootTrustBaseV1, error) { | ||
| dbIt := s.db.Last() |
There was a problem hiding this comment.
does this guarantee that the epoch with the largest value is returned?
There was a problem hiding this comment.
ok. I simply don't remember if it returns last added element (which might for some reason not be the latest epoch) or the largest element
There was a problem hiding this comment.
it returns the largest key, which should be the largest epoch, at least for now
There was a problem hiding this comment.
ok. I simply don't remember if it returns last added element (which might for some reason not be the latest epoch) or the largest element
It shouldn't really be possible to add trust base records out-of-order, because they need to be verified and the verification is via hash backlink to the previous record and signatures of the validators of the previous epoch (both of which you know from the previous trust base record).
|
pls create a follow-up task to add Auth to PUT endpoint |
No description provided.