Update NBxplorer, bump version

This commit is contained in:
nicolas.dorier 2018-01-04 22:43:28 +09:00
parent 44c925a4ba
commit 28ac5608a5
6 changed files with 12 additions and 12 deletions

View File

@ -42,7 +42,7 @@ services:
# - eclair2
nbxplorer:
image: nicolasdorier/nbxplorer:1.0.0.32
image: nicolasdorier/nbxplorer:1.0.0.34
ports:
- "32838:32838"
expose:

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.0.0.49</Version>
<Version>1.0.0.50</Version>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Build\dockerfiles\**" />
@ -24,7 +24,7 @@
<PackageReference Include="NBitcoin" Version="4.0.0.50" />
<PackageReference Include="NBitpayClient" Version="1.0.0.13" />
<PackageReference Include="DBreeze" Version="1.87.0" />
<PackageReference Include="NBXplorer.Client" Version="1.0.0.20" />
<PackageReference Include="NBXplorer.Client" Version="1.0.0.22" />
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.1" />
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.2" />
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.13" />

View File

@ -77,7 +77,7 @@ namespace BTCPayServer.Controllers
public async Task NewBlock(string token)
{
await AssertToken(token);
_EventAggregator.Publish(new NewBlockEvent());
_EventAggregator.Publish(new Events.NewBlockEvent());
}
private async Task AssertToken(string token)

View File

@ -81,7 +81,7 @@ namespace BTCPayServer
status = await GetStatusWithTimeout();
if (status != null)
{
if (status.IsFullySynched())
if (status.IsFullySynched)
{
State = NBXplorerState.Ready;
}
@ -97,7 +97,7 @@ namespace BTCPayServer
{
State = NBXplorerState.NotConnected;
}
else if (status.IsFullySynched())
else if (status.IsFullySynched)
{
State = NBXplorerState.Ready;
}
@ -108,7 +108,7 @@ namespace BTCPayServer
{
State = NBXplorerState.NotConnected;
}
else if (!status.IsFullySynched())
else if (!status.IsFullySynched)
{
State = NBXplorerState.Synching;
}

View File

@ -132,8 +132,8 @@ namespace BTCPayServer.Services.Invoices
var utxos = changes.Confirmed.UTXOs.Concat(changes.Unconfirmed.UTXOs).ToArray();
List<Coin> receivedCoins = new List<Coin>();
foreach (var received in utxos)
if (invoice.AvailableAddressHashes.Contains(received.Output.ScriptPubKey.Hash.ToString()))
receivedCoins.Add(new Coin(received.Outpoint, received.Output));
if (invoice.AvailableAddressHashes.Contains(received.ScriptPubKey.Hash.ToString()))
receivedCoins.Add(received.AsCoin());
var alreadyAccounted = new HashSet<OutPoint>(invoice.Payments.Select(p => p.Outpoint));
bool dirtyAddress = false;
@ -363,7 +363,7 @@ namespace BTCPayServer.Services.Invoices
}
}, null, 0, (int)PollInterval.TotalMilliseconds);
leases.Add(_EventAggregator.Subscribe<NewBlockEvent>(async b => { await NotifyBlock(); }));
leases.Add(_EventAggregator.Subscribe<Events.NewBlockEvent>(async b => { await NotifyBlock(); }));
leases.Add(_EventAggregator.Subscribe<TxOutReceivedEvent>(async b => { await NotifyReceived(b.ScriptPubKey); }));
return Task.CompletedTask;

View File

@ -53,8 +53,8 @@ namespace BTCPayServer.Services.Wallets
public async Task<Money> GetBalance(DerivationStrategyBase derivationStrategy)
{
var result = await _Client.SyncAsync(derivationStrategy, null, true);
return result.Confirmed.UTXOs.Select(u => u.Output.Value)
.Concat(result.Unconfirmed.UTXOs.Select(u => u.Output.Value))
return result.Confirmed.UTXOs.Select(u => u.Value)
.Concat(result.Unconfirmed.UTXOs.Select(u => u.Value))
.Sum();
}
}