Compare commits

...

4 Commits

Author SHA1 Message Date
Nicolas Dorier
e458fa9a61
dewfwf 2026-04-22 11:03:22 +09:00
Nicolas Dorier
6953b59032
workaround 2026-04-22 11:01:59 +09:00
Nicolas Dorier
c27fa064bd
dede 2026-04-22 10:54:42 +09:00
Nicolas Dorier
a63147588c
debug 2026-04-22 10:50:39 +09:00
2 changed files with 30 additions and 2 deletions

View File

@ -2197,6 +2197,15 @@ namespace NBXplorer.Tests
}
}
[Fact]
public async Task DoNothing()
{
using (var tester = CreateTester())
{
throw new Exception("Boom");
}
}
[FactWithTimeout]
public async Task CanTrackSeveralTransactions()
{
@ -2224,6 +2233,22 @@ namespace NBXplorer.Tests
await tester.Client.GetUnusedAsync(pubkey, DerivationFeature.Deposit, reserve: true);
}
uint256 lastTx = null;
Logs.Tester.LogInformation($"Importing 20 descriptions...");
await tester.RPC.SendCommandAsync(new RPCRequest()
{
Method = "importdescriptors",
ThrowIfRPCError = true,
Params = new JArray[]{new JArray(Enumerable.Range(0, 20)
.Select(i => tester.PrivateKeyOf(key, $"0/{i + 1}"))
.Select(k =>
new JObject()
{
["desc"] = Miniscript.AddChecksum($"wpkh({k})"),
["timestamp"] = "now"
}))}
}).ConfigureAwait(false);
for (i = 0; i < 20; i++)
{
LockTestCoins(tester.RPC, addresses);
@ -2231,7 +2256,6 @@ namespace NBXplorer.Tests
coins = coins - Money.Coins(0.001m);
var path = $"0/{i + 1}";
var destination = tester.AddressOf(key, path);
await tester.ImportPrivKeyAsync(key, path);
var txId = await tester.SendToAddressAsync(destination, coins);
Logs.Tester.LogInformation($"Sent to {path} in {txId}");
addresses.Add(destination.ScriptPubKey);

View File

@ -120,7 +120,11 @@ namespace NBXplorer
if (await WithRetry(() => rpc.GetBlockCountAsync()) < rpc.Network.Consensus.CoinbaseMaturity)
{
logger.LogInformation($"Less than {rpc.Network.Consensus.CoinbaseMaturity} blocks, mining some block for regtest (you can disable with NBXPLORER_NOWARMUP=1)");
await rpc.EnsureGenerateAsync(rpc.Network.Consensus.CoinbaseMaturity + 1);
var dest = await rpc.GetNewAddressAsync();
// Need to disable the wallet to workaround https://github.com/bitcoin/bitcoin/issues/33618
await rpc.UnloadWalletAsync(rpc.CredentialString.WalletName);
await rpc.GenerateToAddressAsync(rpc.Network.Consensus.CoinbaseMaturity + 1, dest);
await rpc.LoadWalletAsync(rpc.CredentialString.WalletName);
return true;
}
else