mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 15:05:53 +00:00
Add version and build information to server_info response.
This commit is contained in:
committed by
Vinnie Falco
parent
c6fe72f666
commit
1a2c87b3a8
@@ -1587,6 +1587,7 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\BeastConfig.h" />
|
||||
<ClInclude Include="..\..\build\proto\ripple.pb.h" />
|
||||
<ClInclude Include="..\..\modules\ripple_app\basics\ripple_BuildVersion.h" />
|
||||
<ClInclude Include="..\..\modules\ripple_app\ripple_app.h" />
|
||||
<ClInclude Include="..\..\modules\ripple_basics\containers\ripple_KeyCache.h" />
|
||||
<ClInclude Include="..\..\modules\ripple_basics\containers\ripple_RangeSet.h" />
|
||||
|
||||
@@ -154,6 +154,9 @@
|
||||
<Filter Include="1. Modules\ripple_basics\system">
|
||||
<UniqueIdentifier>{2c4e5c32-0aab-4650-b9a1-22708e9ddc92}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="1. Modules\ripple_app\basics">
|
||||
<UniqueIdentifier>{a99a2905-0d36-40c0-84f5-06db41e48367}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp">
|
||||
@@ -1797,6 +1800,9 @@
|
||||
<ClInclude Include="..\..\modules\ripple_basics\system\ripple_OpenSSLIncludes.h">
|
||||
<Filter>1. Modules\ripple_basics\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\ripple_app\basics\ripple_BuildVersion.h">
|
||||
<Filter>1. Modules\ripple_app\basics</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\src\cpp\protobuf\src\google\protobuf\descriptor.proto">
|
||||
|
||||
45
modules/ripple_app/basics/ripple_BuildVersion.h
Normal file
45
modules/ripple_app/basics/ripple_BuildVersion.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_BUILDVERSION_RIPPLEHEADER
|
||||
#define RIPPLE_BUILDVERSION_RIPPLEHEADER
|
||||
|
||||
/** Versioning information for the build.
|
||||
*/
|
||||
|
||||
class BuildVersion
|
||||
{
|
||||
public:
|
||||
/** Retrieve the build version number.
|
||||
|
||||
This is typically incremented when an official version is publshed
|
||||
with a list of changes.
|
||||
|
||||
Format is:
|
||||
|
||||
<major>.<minor>.<bugfix>
|
||||
*/
|
||||
static char const* getBuildVersion ()
|
||||
{
|
||||
return "0.0.1";
|
||||
}
|
||||
|
||||
/** Retrieve the client API version number.
|
||||
|
||||
The client API version is incremented whenever a new feature
|
||||
or breaking change is made to the websocket / RPC interface.
|
||||
|
||||
Format is:
|
||||
|
||||
<version-number>
|
||||
*/
|
||||
static char const* getClientVersion ()
|
||||
{
|
||||
return "1";
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -85,10 +85,7 @@ namespace ripple
|
||||
// linearize the include sequence and view it in one place.
|
||||
//
|
||||
|
||||
// VFALCO BEGIN CLEAN AREA These are all include-stripped
|
||||
|
||||
#include "src/cpp/ripple/ripple_HashedObject.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_SHAMapItem.h"
|
||||
#include "src/cpp/ripple/ripple_SHAMapNode.h"
|
||||
#include "src/cpp/ripple/ripple_SHAMapTreeNode.h"
|
||||
@@ -96,7 +93,6 @@ namespace ripple
|
||||
#include "src/cpp/ripple/ripple_SHAMapSyncFilter.h"
|
||||
#include "src/cpp/ripple/ripple_SHAMapAddNode.h"
|
||||
#include "src/cpp/ripple/ripple_SHAMap.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_SerializedTransaction.h"
|
||||
#include "src/cpp/ripple/ripple_SerializedLedger.h"
|
||||
#include "src/cpp/ripple/TransactionMeta.h"
|
||||
@@ -104,11 +100,8 @@ namespace ripple
|
||||
#include "src/cpp/ripple/ripple_AccountState.h"
|
||||
#include "src/cpp/ripple/ripple_NicknameState.h"
|
||||
#include "src/cpp/ripple/Ledger.h"
|
||||
|
||||
#include "src/cpp/ripple/SerializedValidation.h"
|
||||
#include "src/cpp/ripple/ripple_ILoadManager.h"
|
||||
|
||||
// These have few dependencies
|
||||
#include "src/cpp/ripple/ripple_DatabaseCon.h"
|
||||
#include "src/cpp/ripple/ripple_ProofOfWork.h"
|
||||
#include "src/cpp/ripple/ripple_InfoSub.h"
|
||||
@@ -116,8 +109,6 @@ namespace ripple
|
||||
#include "src/cpp/ripple/ripple_HashedObjectStore.h"
|
||||
#include "src/cpp/ripple/ripple_OrderBook.h"
|
||||
#include "src/cpp/ripple/ripple_SHAMapSyncFilters.h"
|
||||
|
||||
// Abstract interfaces
|
||||
#include "src/cpp/ripple/ripple_IFeatures.h"
|
||||
#include "src/cpp/ripple/ripple_IFeeVote.h"
|
||||
#include "src/cpp/ripple/ripple_IHashRouter.h"
|
||||
@@ -126,34 +117,15 @@ namespace ripple
|
||||
#include "src/cpp/ripple/ripple_IProofOfWorkFactory.h"
|
||||
#include "src/cpp/ripple/ripple_IUniqueNodeList.h"
|
||||
#include "src/cpp/ripple/ripple_IValidations.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_PeerSet.h"
|
||||
#include "src/cpp/ripple/ripple_InboundLedger.h"
|
||||
#include "src/cpp/ripple/ripple_InboundLedgers.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_Database.h"
|
||||
#include "src/cpp/ripple/ripple_SqliteDatabase.h"
|
||||
|
||||
// VFALCO END CLEAN AREA
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO NOTE Order matters! If you get compile errors, move just 1
|
||||
// include upwards as little as possible to fix it.
|
||||
//
|
||||
#include "src/cpp/ripple/ScriptData.h"
|
||||
#include "src/cpp/ripple/Contract.h"
|
||||
#include "src/cpp/ripple/Interpreter.h"
|
||||
#include "src/cpp/ripple/Operation.h"
|
||||
// VFALCO NOTE Order matters
|
||||
|
||||
// -----------
|
||||
// VFALCO NOTE These have all been include-stripped
|
||||
// ORDER MATTERS A LOT!
|
||||
|
||||
|
||||
|
||||
|
||||
#include "src/cpp/ripple/ripple_AccountItem.h"
|
||||
#include "src/cpp/ripple/ripple_AccountItems.h"
|
||||
#include "src/cpp/ripple/ripple_AcceptedLedgerTx.h"
|
||||
@@ -161,16 +133,10 @@ namespace ripple
|
||||
#include "src/cpp/ripple/ripple_LedgerEntrySet.h"
|
||||
#include "src/cpp/ripple/TransactionEngine.h"
|
||||
#include "src/cpp/ripple/ripple_CanonicalTXSet.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_LedgerHistory.h"
|
||||
#include "src/cpp/ripple/LedgerMaster.h"
|
||||
|
||||
#include "src/cpp/ripple/LedgerProposal.h"
|
||||
#include "src/cpp/ripple/NetworkOPs.h"
|
||||
|
||||
//
|
||||
// -----------
|
||||
|
||||
#include "src/cpp/ripple/TransactionMaster.h"
|
||||
#include "src/cpp/ripple/ripple_LocalCredentials.h"
|
||||
#include "src/cpp/ripple/WSDoor.h"
|
||||
@@ -179,7 +145,6 @@ namespace ripple
|
||||
#include "src/cpp/ripple/TransactionQueue.h"
|
||||
#include "src/cpp/ripple/OrderBookDB.h"
|
||||
#include "src/cpp/ripple/ripple_DatabaseCon.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_IApplication.h"
|
||||
#include "src/cpp/ripple/CallRPC.h"
|
||||
#include "src/cpp/ripple/Transactor.h"
|
||||
@@ -195,12 +160,10 @@ namespace ripple
|
||||
#include "src/cpp/ripple/OfferCreateTransactor.h"
|
||||
#include "src/cpp/ripple/ripple_PathRequest.h"
|
||||
#include "src/cpp/ripple/ParameterTable.h"
|
||||
|
||||
#include "src/cpp/ripple/ripple_RippleLineCache.h"
|
||||
#include "src/cpp/ripple/ripple_PathState.h"
|
||||
#include "src/cpp/ripple/ripple_RippleCalc.h"
|
||||
#include "src/cpp/ripple/ripple_Pathfinder.h"
|
||||
|
||||
#include "src/cpp/ripple/PaymentTransactor.h"
|
||||
#include "src/cpp/ripple/PeerDoor.h"
|
||||
#include "src/cpp/ripple/RPC.h"
|
||||
@@ -218,6 +181,8 @@ namespace ripple
|
||||
#include "src/cpp/ripple/WSHandler.h"
|
||||
#include "src/cpp/ripple/WalletAddTransactor.h"
|
||||
|
||||
#include "basics/ripple_BuildVersion.h" // private
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -1345,6 +1345,9 @@ Json::Value NetworkOPs::getServerInfo (bool human, bool admin)
|
||||
{
|
||||
Json::Value info = Json::objectValue;
|
||||
|
||||
info ["build_version"] = BuildVersion::getBuildVersion ();
|
||||
info ["client_version"] = BuildVersion::getClientVersion ();
|
||||
|
||||
if (theConfig.TESTNET)
|
||||
info["testnet"] = theConfig.TESTNET;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user