mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-22 20:52:35 +00:00
This change decouples app/tx from `Application` and `Config` to clear the way to moving transactors to `libxrpl`.
34 lines
766 B
C++
34 lines
766 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
namespace xrpl {
|
|
|
|
/** Service that provides access to the network ID.
|
|
|
|
This service provides read-only access to the network ID configured
|
|
for this server. The network ID identifies which network (mainnet,
|
|
testnet, devnet, or custom network) this server is configured to
|
|
connect to.
|
|
|
|
Well-known network IDs:
|
|
- 0: Mainnet
|
|
- 1: Testnet
|
|
- 2: Devnet
|
|
- 1025+: Custom networks (require NetworkID field in transactions)
|
|
*/
|
|
class NetworkIDService
|
|
{
|
|
public:
|
|
virtual ~NetworkIDService() = default;
|
|
|
|
/** Get the configured network ID
|
|
*
|
|
* @return The network ID this server is configured for
|
|
*/
|
|
virtual std::uint32_t
|
|
getNetworkID() const noexcept = 0;
|
|
};
|
|
|
|
} // namespace xrpl
|