mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
fix: Acquire lock on getClosedLedgerHash
This commit is contained in:
committed by
Ayaz Salikhov
parent
846369cbe7
commit
d60955e2fc
@@ -333,7 +333,7 @@ public:
|
||||
setPublisherListSequence(PublicKey const&, std::size_t const) override
|
||||
{
|
||||
}
|
||||
[[nodiscard]] uint256 const&
|
||||
[[nodiscard]] uint256
|
||||
getClosedLedgerHash() const override
|
||||
{
|
||||
static uint256 const kHash{};
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
setPublisherListSequence(PublicKey const&, std::size_t const) override
|
||||
{
|
||||
}
|
||||
[[nodiscard]] uint256 const&
|
||||
[[nodiscard]] uint256
|
||||
getClosedLedgerHash() const override
|
||||
{
|
||||
static uint256 const kHash{};
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
// Ledger
|
||||
//
|
||||
|
||||
[[nodiscard]] virtual uint256 const&
|
||||
[[nodiscard]] virtual uint256
|
||||
getClosedLedgerHash() const = 0;
|
||||
[[nodiscard]] virtual bool
|
||||
hasLedger(uint256 const& hash, std::uint32_t seq) const = 0;
|
||||
|
||||
@@ -426,9 +426,10 @@ public:
|
||||
// Ledger
|
||||
//
|
||||
|
||||
uint256 const&
|
||||
uint256
|
||||
getClosedLedgerHash() const override
|
||||
{
|
||||
std::scoped_lock const sl{recentLock_};
|
||||
return closedLedgerHash_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user