Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e458fa9a61 | ||
|
|
6953b59032 | ||
|
|
c27fa064bd | ||
|
|
a63147588c |
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user