From b07010d95617e4435b1601cb694534cf848c624a Mon Sep 17 00:00:00 2001 From: son trinh Date: Tue, 12 Dec 2023 02:53:27 +0700 Subject: [PATCH] imp: mark `GetTimestamp` as deprecated (#5353) Co-authored-by: DimitrisJim --- .../03-light-clients/01-developer-guide/03-consensus-state.md | 2 ++ modules/core/exported/client.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/docs/03-light-clients/01-developer-guide/03-consensus-state.md b/docs/docs/03-light-clients/01-developer-guide/03-consensus-state.md index b9e03083e6f..a716a6477d7 100644 --- a/docs/docs/03-light-clients/01-developer-guide/03-consensus-state.md +++ b/docs/docs/03-light-clients/01-developer-guide/03-consensus-state.md @@ -20,6 +20,8 @@ This is the type of client consensus. It should be the same as the `ClientType` ## `GetTimestamp` method +*Deprecated*: soon to be removed from interface + `GetTimestamp` should return the timestamp (in nanoseconds) of the consensus state snapshot. ## `ValidateBasic` method diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index cf5d11ca617..75e58a898c5 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -148,6 +148,9 @@ type ConsensusState interface { ClientType() string // Consensus kind // GetTimestamp returns the timestamp (in nanoseconds) of the consensus state + // + // Deprecated: GetTimestamp is not used outside of the light client implementations, + // and therefore it doesn't need to be an interface function. GetTimestamp() uint64 ValidateBasic() error