mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Migrate off of posix_time and most uses of C time_t.
This commit is contained in:
committed by
Vinnie Falco
parent
2e2a7509cd
commit
5d9e53a37d
@@ -21,12 +21,10 @@
|
||||
#define RIPPLE_APP_LEDGER_LEDGERTOJSON_H_INCLUDED
|
||||
|
||||
#include <ripple/app/ledger/Ledger.h>
|
||||
#include <ripple/basics/Time.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/protocol/STTx.h>
|
||||
#include <ripple/json/Object.h>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
enum
|
||||
{
|
||||
// Number of peers to start with
|
||||
@@ -45,9 +47,6 @@ enum
|
||||
// Number of peers to add on a timeout
|
||||
,peerCountAdd = 2
|
||||
|
||||
// millisecond for each ledger timeout
|
||||
,ledgerAcquireTimeoutMillis = 2500
|
||||
|
||||
// how many timeouts before we giveup
|
||||
,ledgerTimeoutRetriesMax = 10
|
||||
|
||||
@@ -64,9 +63,12 @@ enum
|
||||
,reqNodes = 8
|
||||
};
|
||||
|
||||
// millisecond for each ledger timeout
|
||||
auto constexpr ledgerAcquireTimeout = 2500ms;
|
||||
|
||||
InboundLedger::InboundLedger (
|
||||
Application& app, uint256 const& hash, std::uint32_t seq, fcReason reason, clock_type& clock)
|
||||
: PeerSet (app, hash, ledgerAcquireTimeoutMillis, false, clock,
|
||||
: PeerSet (app, hash, ledgerAcquireTimeout, false, clock,
|
||||
app.journal("InboundLedger"))
|
||||
, mHaveHeader (false)
|
||||
, mHaveState (false)
|
||||
|
||||
@@ -74,8 +74,7 @@ void fillJson(Object& json, bool closed, LedgerInfo const& info, bool bFull)
|
||||
|
||||
if (info.closeTime != NetClock::time_point{})
|
||||
{
|
||||
json[jss::close_time_human] = boost::posix_time::to_simple_string (
|
||||
ptFromSeconds (info.closeTime.time_since_epoch().count()));
|
||||
json[jss::close_time_human] = to_string(info.closeTime);
|
||||
if (! getCloseAgree(info))
|
||||
json[jss::close_time_estimated] = true;
|
||||
}
|
||||
|
||||
@@ -30,11 +30,13 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
// Timeout interval in milliseconds
|
||||
auto constexpr TX_ACQUIRE_TIMEOUT = 250ms;
|
||||
|
||||
enum
|
||||
{
|
||||
// Timeout interval in milliseconds
|
||||
TX_ACQUIRE_TIMEOUT = 250,
|
||||
|
||||
NORM_TIMEOUTS = 4,
|
||||
MAX_TIMEOUTS = 20,
|
||||
};
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/basics/random.h>
|
||||
#include <ripple/basics/Time.h>
|
||||
#include <ripple/protocol/digest.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/basics/UptimeTimer.h>
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <ripple/net/InfoSub.h>
|
||||
#include <memory>
|
||||
#include <ripple/core/Stoppable.h>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <deque>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user