Skip to content

Commit 5ab3da5

Browse files
committed
Improve docs, show version on startup
1 parent dbfd09e commit 5ab3da5

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

NBXplorer.Tests/ServerTester.cs

-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ private void StartNBXplorer()
153153
keyValues.Add(("rmqblockex", RabbitMqTestConfig.RabbitMqBlockExchange));
154154
}
155155
var args = keyValues.SelectMany(kv => new[] { $"--{kv.key}", kv.value }
156-
.Concat(new[] { $"--{CryptoCode.ToLowerInvariant()}hastxindex" }))
157156
.Concat(AdditionalFlags)
158157
.Concat(additionalFlags).ToArray();
159158
Host = new WebHostBuilder()

NBXplorer/Configuration/DefaultConfiguration.cs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ protected override CommandLineApplication CreateCommandLineApplicationCore()
4040
app.Option($"--{crypto}startheight", $"The height where starting the scan (default: where your rpc server was synched when you first started this program)", CommandOptionType.SingleValue);
4141
app.Option($"--{crypto}minutxovalue", $"The minimum value of tracked UTXOs, any UTXO with value less than this is ignored. (default: 1 (satoshi))", CommandOptionType.SingleValue);
4242
app.Option($"--{crypto}nodeendpoint", $"The p2p connection to a Bitcoin node, make sure you are whitelisted (default: default p2p node on localhost, depends on network)", CommandOptionType.SingleValue);
43-
app.Option($"--{crypto}hastxindex", "If true, NBXplorer will try to fetch missing transactions from the local node. If the node support getindexinfo, this setting is ignored. (default: false)", CommandOptionType.BoolValue);
4443
app.Option($"--{crypto}exposerpc", $"Expose the node RPCs through the REST API (default: false)", CommandOptionType.SingleValue);
4544
}
4645

NBXplorer/Configuration/ExplorerConfiguration.cs

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ public ExplorerConfiguration LoadArgs(IConfiguration config)
139139
}
140140
}
141141

142-
chainConfiguration.HasTxIndex = config.GetOrDefault<bool>($"{network.CryptoCode}.hastxindex", false);
143142
chainConfiguration.ExposeRPC = config.GetOrDefault<bool>($"{network.CryptoCode}.exposerpc", exposeRPCGlobal);
144143
chainConfiguration.NoWarmup = config.GetOrDefault<bool>($"nowarmup", false);
145144
ChainConfigurations.Add(chainConfiguration);

NBXplorer/Program.cs

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.Extensions.Configuration;
88
using CommandLine;
99
using System.Runtime.CompilerServices;
10+
using System.Reflection;
1011

1112
[assembly: InternalsVisibleTo("NBXplorer.Tests")]
1213
namespace NBXplorer
@@ -15,8 +16,11 @@ public class Program
1516
{
1617
public static void Main(string[] args)
1718
{
19+
var version = typeof(Program).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
1820
var processor = new ConsoleLoggerProcessor();
1921
Logs.Configure(new FuncLoggerFactory(i => new CustomerConsoleLogger(i, (a, b) => true, null, processor)));
22+
if (version is { InformationalVersion: { } v })
23+
Logs.Configuration.LogInformation($"NBXplorer version {v.Split('+')[0]}");
2024
IWebHost host = null;
2125
try
2226
{

NBXplorer/wwwroot/api.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3844,7 +3844,7 @@
38443844
"/cryptos/{cryptoCode}/node/rpc": {
38453845
"post": {
38463846
"summary": "Proxy RPC call to the underlying node",
3847-
"description": "Allows you to make RPC calls to the underlying cryptocurrency node (e.g., Bitcoin Core) via NBXplorer. This endpoint acts as a proxy, forwarding your RPC requests to the node and returning the node's responses. Go to https://www.jsonrpc.org/specification and https://developer.bitcoin.org/reference/rpc for more info.",
3847+
"description": "Allows you to make RPC calls to the underlying cryptocurrency node (e.g., Bitcoin Core) via NBXplorer. This endpoint acts as a proxy, forwarding your RPC requests to the node and returning the node's responses.\n\nBy default, only a handful of RPC methods are authorized. You can use [configuration](https://github.com/dgarage/NBXplorer/blob/master/docs/API.md#configuration) `--btcexposerpc` or `NBXPLORER_BTCEXPOSERPC=1` to allow all methods.\n\nGo to [The JSON-RPC specification page](https://www.jsonrpc.org/specification) and the [Bitcoin Core RPC page](https://developer.bitcoin.org/reference/rpc) for more information.",
38483848
"tags": [
38493849
"Blockchain"
38503850
],

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This explorer is not intended to be exposed to the internet; it should be used a
2020
4. `Electrum protocol` is cumbersome for HD wallets.
2121
5. `Bitcoin Core RPC` is inflexible and difficult to use. It also scales poorly when a wallet has too many addresses or UTXOs.
2222
6. `Bitcoin Core RPC` supports multiple wallets but isn't designed to handle thousands of them. Having too many wallets will not scale.
23-
7. While NBXplorer exposes an API, it also allows you to query the data using the most expressive and flexible language designed for this purpose: `SQL`.
23+
7. While NBXplorer exposes an [API](https://dgarage.github.io/NBXplorer/), it also allows you to query the data using the most expressive and flexible language designed for this purpose: [SQL](./docs/docs/Postgres-Schema.md).
2424

2525
## Typical usage
2626

0 commit comments

Comments
 (0)