diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml index 918b1c3c3..d2321ba1e 100644 --- a/BTCPayServer.Tests/docker-compose.yml +++ b/BTCPayServer.Tests/docker-compose.yml @@ -89,14 +89,15 @@ services: - "bitcoin_datadir:/data" customer_lightningd: - image: nicolasdorier/clightning:0.0.0.12-dev + image: nicolasdorier/clightning:0.0.0.14-dev environment: EXPOSE_TCP: "true" LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind network=regtest - ipaddr=customer_lightningd + bind-addr=0.0.0.0 + announce-addr=customer_lightningd log-level=debug dev-broadcast-interval=1000 ports: @@ -130,13 +131,14 @@ services: - merchant_lightningd merchant_lightningd: - image: nicolasdorier/clightning:0.0.0.11-dev + image: nicolasdorier/clightning:0.0.0.14-dev environment: EXPOSE_TCP: "true" LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=merchant_lightningd + bind-addr=0.0.0.0 + announce-addr=merchant_lightningd network=regtest log-level=debug dev-broadcast-interval=1000 diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 1faa87fde..9bec0d419 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -1,4 +1,4 @@ - + Exe netcoreapp2.1 @@ -47,8 +47,7 @@ - - + diff --git a/BTCPayServer/Events/NBXplorerStateChangedEvent.cs b/BTCPayServer/Events/NBXplorerStateChangedEvent.cs index 15280bb19..5774140ff 100644 --- a/BTCPayServer/Events/NBXplorerStateChangedEvent.cs +++ b/BTCPayServer/Events/NBXplorerStateChangedEvent.cs @@ -6,21 +6,6 @@ using BTCPayServer.HostedServices; namespace BTCPayServer.Events { - public class NBXplorerErrorEvent - { - public NBXplorerErrorEvent(BTCPayNetwork network, string errorMessage) - { - Message = errorMessage; - Network = network; - } - public string Message { get; set; } - public BTCPayNetwork Network { get; set; } - - public override string ToString() - { - return $"{Network.CryptoCode}: NBXplorer error `{Message}`"; - } - } public class NBXplorerStateChangedEvent { public NBXplorerStateChangedEvent(BTCPayNetwork network, NBXplorerState old, NBXplorerState newState) diff --git a/BTCPayServer/HostedServices/NBXplorerWaiter.cs b/BTCPayServer/HostedServices/NBXplorerWaiter.cs index 3ac9b52ce..72eb0f9dc 100644 --- a/BTCPayServer/HostedServices/NBXplorerWaiter.cs +++ b/BTCPayServer/HostedServices/NBXplorerWaiter.cs @@ -192,7 +192,7 @@ namespace BTCPayServer.HostedServices { State = NBXplorerState.NotConnected; status = null; - _Aggregator.Publish(new NBXplorerErrorEvent(_Network, error)); + Logs.PayServer.LogError($"{_Network.CryptoCode}: NBXplorer error `{error}`"); } _Dashboard.Publish(_Network, State, status, error); diff --git a/BTCPayServer/Migrations/20170913143004_Init.cs b/BTCPayServer/Migrations/20170913143004_Init.cs index 7d58bd4b1..149900b1f 100644 --- a/BTCPayServer/Migrations/20170913143004_Init.cs +++ b/BTCPayServer/Migrations/20170913143004_Init.cs @@ -12,10 +12,10 @@ namespace BTCPayServer.Migrations name: "AspNetRoles", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - ConcurrencyStamp = table.Column(type: "TEXT", nullable: true), - Name = table.Column(type: "TEXT", maxLength: 256, nullable: true), - NormalizedName = table.Column(type: "TEXT", maxLength: 256, nullable: true) + Id = table.Column(nullable: false), + ConcurrencyStamp = table.Column(nullable: true), + Name = table.Column(maxLength: 256, nullable: true), + NormalizedName = table.Column(maxLength: 256, nullable: true) }, constraints: table => { @@ -26,21 +26,21 @@ namespace BTCPayServer.Migrations name: "AspNetUsers", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - AccessFailedCount = table.Column(type: "INTEGER", nullable: false), - ConcurrencyStamp = table.Column(type: "TEXT", nullable: true), - Email = table.Column(type: "TEXT", maxLength: 256, nullable: true), + Id = table.Column(nullable: false), + AccessFailedCount = table.Column(nullable: false), + ConcurrencyStamp = table.Column(nullable: true), + Email = table.Column(maxLength: 256, nullable: true), EmailConfirmed = table.Column(nullable: false), LockoutEnabled = table.Column(nullable: false), LockoutEnd = table.Column(nullable: true), - NormalizedEmail = table.Column(type: "TEXT", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "TEXT", maxLength: 256, nullable: true), - PasswordHash = table.Column(type: "TEXT", nullable: true), - PhoneNumber = table.Column(type: "TEXT", nullable: true), + NormalizedEmail = table.Column(maxLength: 256, nullable: true), + NormalizedUserName = table.Column(maxLength: 256, nullable: true), + PasswordHash = table.Column(nullable: true), + PhoneNumber = table.Column(nullable: true), PhoneNumberConfirmed = table.Column(nullable: false), - SecurityStamp = table.Column(type: "TEXT", nullable: true), + SecurityStamp = table.Column(nullable: true), TwoFactorEnabled = table.Column(nullable: false), - UserName = table.Column(type: "TEXT", maxLength: 256, nullable: true) + UserName = table.Column(maxLength: 256, nullable: true) }, constraints: table => { @@ -51,12 +51,12 @@ namespace BTCPayServer.Migrations name: "Stores", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - DerivationStrategy = table.Column(type: "TEXT", nullable: true), - SpeedPolicy = table.Column(type: "INTEGER", nullable: false), + Id = table.Column(nullable: false), + DerivationStrategy = table.Column(nullable: true), + SpeedPolicy = table.Column(nullable: false), StoreCertificate = table.Column(nullable: true), - StoreName = table.Column(type: "TEXT", nullable: true), - StoreWebsite = table.Column(type: "TEXT", nullable: true) + StoreName = table.Column(nullable: true), + StoreWebsite = table.Column(nullable: true) }, constraints: table => { @@ -67,11 +67,11 @@ namespace BTCPayServer.Migrations name: "AspNetRoleClaims", columns: table => new { - Id = table.Column(type: "INTEGER", nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - ClaimType = table.Column(type: "TEXT", nullable: true), - ClaimValue = table.Column(type: "TEXT", nullable: true), - RoleId = table.Column(type: "TEXT", nullable: false) + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true), + RoleId = table.Column(nullable: false) }, constraints: table => { @@ -88,11 +88,11 @@ namespace BTCPayServer.Migrations name: "AspNetUserClaims", columns: table => new { - Id = table.Column(type: "INTEGER", nullable: false) + Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), - ClaimType = table.Column(type: "TEXT", nullable: true), - ClaimValue = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "TEXT", nullable: false) + ClaimType = table.Column(nullable: true), + ClaimValue = table.Column(nullable: true), + UserId = table.Column(nullable: false) }, constraints: table => { @@ -109,10 +109,10 @@ namespace BTCPayServer.Migrations name: "AspNetUserLogins", columns: table => new { - LoginProvider = table.Column(type: "TEXT", nullable: false), - ProviderKey = table.Column(type: "TEXT", nullable: false), - ProviderDisplayName = table.Column(type: "TEXT", nullable: true), - UserId = table.Column(type: "TEXT", nullable: false) + LoginProvider = table.Column(nullable: false), + ProviderKey = table.Column(nullable: false), + ProviderDisplayName = table.Column(nullable: true), + UserId = table.Column(nullable: false) }, constraints: table => { @@ -129,8 +129,8 @@ namespace BTCPayServer.Migrations name: "AspNetUserRoles", columns: table => new { - UserId = table.Column(type: "TEXT", nullable: false), - RoleId = table.Column(type: "TEXT", nullable: false) + UserId = table.Column(nullable: false), + RoleId = table.Column(nullable: false) }, constraints: table => { @@ -153,10 +153,10 @@ namespace BTCPayServer.Migrations name: "AspNetUserTokens", columns: table => new { - UserId = table.Column(type: "TEXT", nullable: false), - LoginProvider = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", nullable: false), - Value = table.Column(type: "TEXT", nullable: true) + UserId = table.Column(nullable: false), + LoginProvider = table.Column(nullable: false), + Name = table.Column(nullable: false), + Value = table.Column(nullable: true) }, constraints: table => { @@ -173,15 +173,15 @@ namespace BTCPayServer.Migrations name: "Invoices", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), + Id = table.Column(nullable: false), Blob = table.Column(nullable: true), Created = table.Column(nullable: false), - CustomerEmail = table.Column(type: "TEXT", nullable: true), - ExceptionStatus = table.Column(type: "TEXT", nullable: true), - ItemCode = table.Column(type: "TEXT", nullable: true), - OrderId = table.Column(type: "TEXT", nullable: true), - Status = table.Column(type: "TEXT", nullable: true), - StoreDataId = table.Column(type: "TEXT", nullable: true) + CustomerEmail = table.Column(nullable: true), + ExceptionStatus = table.Column(nullable: true), + ItemCode = table.Column(nullable: true), + OrderId = table.Column(nullable: true), + Status = table.Column(nullable: true), + StoreDataId = table.Column(nullable: true) }, constraints: table => { @@ -198,9 +198,9 @@ namespace BTCPayServer.Migrations name: "UserStore", columns: table => new { - ApplicationUserId = table.Column(type: "TEXT", nullable: false), - StoreDataId = table.Column(type: "TEXT", nullable: false), - Role = table.Column(type: "TEXT", nullable: true) + ApplicationUserId = table.Column(nullable: false), + StoreDataId = table.Column(nullable: false), + Role = table.Column(nullable: true) }, constraints: table => { @@ -223,9 +223,9 @@ namespace BTCPayServer.Migrations name: "Payments", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), + Id = table.Column(nullable: false), Blob = table.Column(nullable: true), - InvoiceDataId = table.Column(type: "TEXT", nullable: true) + InvoiceDataId = table.Column(nullable: true) }, constraints: table => { @@ -242,9 +242,9 @@ namespace BTCPayServer.Migrations name: "RefundAddresses", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), + Id = table.Column(nullable: false), Blob = table.Column(nullable: true), - InvoiceDataId = table.Column(type: "TEXT", nullable: true) + InvoiceDataId = table.Column(nullable: true) }, constraints: table => { diff --git a/BTCPayServer/Migrations/20170926073744_Settings.cs b/BTCPayServer/Migrations/20170926073744_Settings.cs index 60d8f3fde..efca94c61 100644 --- a/BTCPayServer/Migrations/20170926073744_Settings.cs +++ b/BTCPayServer/Migrations/20170926073744_Settings.cs @@ -12,8 +12,8 @@ namespace BTCPayServer.Migrations name: "Settings", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - Value = table.Column(type: "TEXT", nullable: true) + Id = table.Column(nullable: false), + Value = table.Column(nullable: true) }, constraints: table => { diff --git a/BTCPayServer/Migrations/20171006013443_AddressMapping.cs b/BTCPayServer/Migrations/20171006013443_AddressMapping.cs index aba4aa2ed..18a312349 100644 --- a/BTCPayServer/Migrations/20171006013443_AddressMapping.cs +++ b/BTCPayServer/Migrations/20171006013443_AddressMapping.cs @@ -12,8 +12,8 @@ namespace BTCPayServer.Migrations name: "AddressInvoices", columns: table => new { - Address = table.Column(type: "TEXT", nullable: false), - InvoiceDataId = table.Column(type: "TEXT", nullable: true) + Address = table.Column(nullable: false), + InvoiceDataId = table.Column(nullable: true) }, constraints: table => { diff --git a/BTCPayServer/Migrations/20171010082424_Tokens.cs b/BTCPayServer/Migrations/20171010082424_Tokens.cs index dc2669da3..9847f8a15 100644 --- a/BTCPayServer/Migrations/20171010082424_Tokens.cs +++ b/BTCPayServer/Migrations/20171010082424_Tokens.cs @@ -12,13 +12,13 @@ namespace BTCPayServer.Migrations name: "PairedSINData", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), - Facade = table.Column(type: "TEXT", nullable: true), - Label = table.Column(type: "TEXT", nullable: true), - Name = table.Column(type: "TEXT", nullable: true), + Id = table.Column(nullable: false), + Facade = table.Column(nullable: true), + Label = table.Column(nullable: true), + Name = table.Column(nullable: true), PairingTime = table.Column(nullable: false), - SIN = table.Column(type: "TEXT", nullable: true), - StoreDataId = table.Column(type: "TEXT", nullable: true) + SIN = table.Column(nullable: true), + StoreDataId = table.Column(nullable: true) }, constraints: table => { @@ -29,15 +29,15 @@ namespace BTCPayServer.Migrations name: "PairingCodes", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false), + Id = table.Column(nullable: false), DateCreated = table.Column(nullable: false), Expiration = table.Column(nullable: false), - Facade = table.Column(type: "TEXT", nullable: true), - Label = table.Column(type: "TEXT", nullable: true), - Name = table.Column(type: "TEXT", nullable: true), - SIN = table.Column(type: "TEXT", nullable: true), - StoreDataId = table.Column(type: "TEXT", nullable: true), - TokenValue = table.Column(type: "TEXT", nullable: true) + Facade = table.Column(nullable: true), + Label = table.Column(nullable: true), + Name = table.Column(nullable: true), + SIN = table.Column(nullable: true), + StoreDataId = table.Column(nullable: true), + TokenValue = table.Column(nullable: true) }, constraints: table => { diff --git a/BTCPayServer/Migrations/20171012020112_PendingInvoices.cs b/BTCPayServer/Migrations/20171012020112_PendingInvoices.cs index 5ac527ac3..1711c54e6 100644 --- a/BTCPayServer/Migrations/20171012020112_PendingInvoices.cs +++ b/BTCPayServer/Migrations/20171012020112_PendingInvoices.cs @@ -22,7 +22,7 @@ namespace BTCPayServer.Migrations name: "PendingInvoices", columns: table => new { - Id = table.Column(type: "TEXT", nullable: false) + Id = table.Column(nullable: false) }, constraints: table => { diff --git a/BTCPayServer/Migrations/20171024163354_RenewUsedAddresses.cs b/BTCPayServer/Migrations/20171024163354_RenewUsedAddresses.cs index d852c5224..83b785dc4 100644 --- a/BTCPayServer/Migrations/20171024163354_RenewUsedAddresses.cs +++ b/BTCPayServer/Migrations/20171024163354_RenewUsedAddresses.cs @@ -17,8 +17,8 @@ namespace BTCPayServer.Migrations name: "HistoricalAddressInvoices", columns: table => new { - InvoiceDataId = table.Column(type: "TEXT", nullable: false), - Address = table.Column(type: "TEXT", nullable: false), + InvoiceDataId = table.Column(nullable: false), + Address = table.Column(nullable: false), Assigned = table.Column(nullable: false), UnAssigned = table.Column(nullable: true) },