summaryrefslogtreecommitdiff
path: root/src/mongo/db/signed_logical_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/signed_logical_time.h')
-rw-r--r--src/mongo/db/signed_logical_time.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/signed_logical_time.h b/src/mongo/db/signed_logical_time.h
index fde222efb39..caf7830fb32 100644
--- a/src/mongo/db/signed_logical_time.h
+++ b/src/mongo/db/signed_logical_time.h
@@ -44,6 +44,9 @@ public:
SignedLogicalTime() = default;
+ explicit SignedLogicalTime(LogicalTime time, long long keyId)
+ : _time(std::move(time)), _keyId(keyId) {}
+
explicit SignedLogicalTime(LogicalTime time, TimeProof proof, long long keyId)
: _time(std::move(time)), _proof(std::move(proof)), _keyId(keyId) {}
@@ -51,7 +54,7 @@ public:
return _time;
}
- const TimeProof& getProof() const {
+ boost::optional<TimeProof> getProof() const {
return _proof;
}
@@ -65,7 +68,7 @@ public:
private:
LogicalTime _time;
- TimeProof _proof;
+ boost::optional<TimeProof> _proof;
long long _keyId{0};
};