Skip to content

Commit

Permalink
Merge pull request #13 from Elenpay/v2.5.9
Browse files Browse the repository at this point in the history
v2.5.9
  • Loading branch information
RodriFS authored Nov 11, 2024
2 parents c4ef7f4 + 32c99e0 commit 79f3bfc
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 6 deletions.
4 changes: 2 additions & 2 deletions NBXplorer.Client/NBXplorer.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<NoWarn>$(NoWarn);1591;1573;1572;1584;1570;3021</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NBitcoin" Version="7.0.37" />
<PackageReference Include="NBitcoin.Altcoins" Version="3.0.24" />
<PackageReference Include="NBitcoin" Version="7.0.41" />
<PackageReference Include="NBitcoin.Altcoins" Version="3.0.27" />
<PackageReference Include="System.Net.WebSockets.Client" Version="4.3.2" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion NBXplorer.Tests/ServerTester.Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void SetEnvironment()
//Network = NBitcoin.Altcoins.Viacoin.Instance.Regtest;

//CryptoCode = "GRS";
//nodeDownloadData = NodeDownloadData.Groestlcoin.v26_0;
//nodeDownloadData = NodeDownloadData.Groestlcoin.v28_0;
//Network = NBitcoin.Altcoins.Groestlcoin.Instance.Regtest;

//CryptoCode = "BTX";
Expand Down
11 changes: 11 additions & 0 deletions NBXplorer.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using System.Globalization;
using System.Net;
using NBXplorer.HostedServices;
using NBitcoin.Altcoins;

namespace NBXplorer.Tests
{
Expand Down Expand Up @@ -2549,6 +2550,16 @@ public async Task CanTrackAddress()
}
}

[Fact]
public async Task Test()
{
var rpc = new RPCClient(new RPCCredentialString()
{
UserPassword = new NetworkCredential("dashrpc","PQQgOzs1jN7q2SWQ6TpBNLm9j"),
}, "https://dash-testnet.nodes.m3t4c0.xyz", AltNetworkSets.Dash.Testnet);
var b1 = await rpc.GetBlockAsync(new uint256("000001f02c1623e0bb12b54ac505cefdfca3f0f664bf333fc73ae5eafe34b830"));
}

[FactWithTimeout]
public async Task CanTrack2()
{
Expand Down
1 change: 1 addition & 0 deletions NBXplorer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFi
.dockerignore = .dockerignore
docs\API.md = docs\API.md
.circleci\config.yml = .circleci\config.yml
docker-compose.mutiny.yml = docker-compose.mutiny.yml
docker-compose.regtest.yml = docker-compose.regtest.yml
Dockerfile = Dockerfile
global.json = global.json
Expand Down
2 changes: 2 additions & 0 deletions NBXplorer/Backend/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,8 @@ private async Task<BlockLocator> GetIndexProgressCore(DbConnection connection)
return null;
var locator = new BlockLocator();
locator.ReadWrite(data, Network.NBitcoinNetwork);
if (locator.Blocks.Count == 0)
return null;
return locator;
}

Expand Down
6 changes: 4 additions & 2 deletions NBXplorer/Configuration/DefaultConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ public static ChainName GetNetworkType(IConfiguration conf)
}
return n.ChainName;
}

var net = conf.GetOrDefault<bool>("regtest", false) ? ChainName.Regtest :
conf.GetOrDefault<bool>("testnet", false) ? ChainName.Testnet :
conf.GetOrDefault<bool>("signet", false) ? new ChainName("signet") : ChainName.Mainnet;
conf.GetOrDefault<bool>("testnet", false) ? ChainName.Testnet :
conf.GetOrDefault<bool>("signet", false) ? Bitcoin.Instance.Signet.ChainName :
conf.GetOrDefault<bool>("mutinynet", false) ? Bitcoin.Instance.Mutinynet.ChainName : ChainName.Mainnet;
return net;
}

Expand Down
2 changes: 1 addition & 1 deletion NBXplorer/NBXplorer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">net8.0</TargetFramework>
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
<Version>2.5.6</Version>
<Version>2.5.9</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\NBXplorer.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591;CS1591</NoWarn>
<LangVersion>12</LangVersion>
Expand Down
18 changes: 18 additions & 0 deletions NBXplorer/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@
"applicationUrl": "http://localhost:4774",
"launchUrl": "v1/cryptos/lbtc/status"
},
"NBXplorer - BTC mutinynet from Docker": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"NBXPLORER_NETWORK": "mutinynet",
"NBXPLORER_CHAINS":"btc",
"NBXPLORER_BTCRPCURL": "http://127.0.0.1:43782/",
"NBXPLORER_BTCNODEENDPOINT": "127.0.0.1:39388",
"NBXPLORER_NOAUTH": "true",
"NBXPLORER_EXPOSERPC": "true",
"NBXPLORER_BTCRPCUSER": "bitcoin",
"NBXPLORER_BTCRPCPASSWORD": "bitcoin",
"NBXPLORER_POSTGRES": "User ID=postgres;Application Name=test;Include Error Detail=true;Host=localhost;Port=39383"
},
"applicationUrl": "http://localhost:4774",
"launchUrl": "v1/cryptos/btc/status"
},
"NBXplorer - DASH on Testnet": {
"commandName": "Project",
"commandLineArgs": "--chains=dash --network=testnet",
Expand Down
54 changes: 54 additions & 0 deletions docker-compose.mutiny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
version: "3"

services:

bitcoind:
restart: always
container_name: btcpayserver_bitcoind
image: btcpayserver/mutinynet:c23afab47fbe
environment:
BITCOIN_NETWORK: signet
BITCOIN_EXTRA_ARGS: |
rpcport=43782
rpcallowip=0.0.0.0/0
rpcbind=0.0.0.0:43782
rpcauth=bitcoin:103604886c08fdeaa8826d9b670a77d7$$4ad48fb794d0fc83e2e7e1db893778ca56380903328f9ba4c5c29936f9a19adc
port=39388
whitelist=0.0.0.0/0
signetchallenge=512102f7561d208dd9ae99bf497273e16f389bdbd6c4742ddb8e6b216e64fa2928ad8f51ae
addnode=45.79.52.207:38333
dnsseed=0
signetblocktime=30
expose:
- "43782"
- "39388"
ports:
- "43782:43782"
- "39388:39388"
volumes:
- "bitcoin_datadir:/data"

rabbitmq:
image: rabbitmq:3-management
hostname: rabbitmq
ports:
- 4369:4369
- 5671:5671
- 5672:5672
- 15672:15672

postgres:
image: postgres:13
container_name: nbxplorertests_postgres_1
command: [ "-c", "random_page_cost=1.0", "-c", "shared_preload_libraries=pg_stat_statements" ]
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "39383:5432"
expose:
- "5432"


volumes:
nbxplorer_datadir:
bitcoin_datadir:

0 comments on commit 79f3bfc

Please sign in to comment.