diff --git a/BTCPayServer.Tests/docker-compose.altcoins.yml b/BTCPayServer.Tests/docker-compose.altcoins.yml index 03b0df5b8..436a5b1be 100644 --- a/BTCPayServer.Tests/docker-compose.altcoins.yml +++ b/BTCPayServer.Tests/docker-compose.altcoins.yml @@ -12,6 +12,7 @@ services: args: CONFIGURATION_NAME: Altcoins-Release environment: + TESTS_EXPERIMENTALV2_CONFIRM: "true" TESTS_BTCRPCCONNECTION: server=http://bitcoind:43782;ceiwHEbqWI83:DwubwWsoo3 TESTS_LTCRPCCONNECTION: server=http://litecoind:43782;ceiwHEbqWI83:DwubwWsoo3 TESTS_BTCNBXPLORERURL: http://nbxplorer:32838/ diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml index df5cb93cb..1beab8aeb 100644 --- a/BTCPayServer.Tests/docker-compose.yml +++ b/BTCPayServer.Tests/docker-compose.yml @@ -12,6 +12,7 @@ services: args: CONFIGURATION_NAME: Release environment: + TESTS_EXPERIMENTALV2_CONFIRM: "true" TESTS_BTCRPCCONNECTION: server=http://bitcoind:43782;ceiwHEbqWI83:DwubwWsoo3 TESTS_BTCNBXPLORERURL: http://nbxplorer:32838/ TESTS_DB: "Postgres" diff --git a/BTCPayServer/Program.cs b/BTCPayServer/Program.cs index aace9b3a2..b2462e2a6 100644 --- a/BTCPayServer/Program.cs +++ b/BTCPayServer/Program.cs @@ -45,6 +45,12 @@ namespace BTCPayServer #endif conf = confBuilder.Build(); + + var confirm = conf.GetOrDefault("EXPERIMENTALV2_CONFIRM", false); + if(!confirm) + { + throw new ConfigException("You are running an experimental version of BTCPay Server that is the basis for v2. Many things will change and break, including irreversible database migrations. THERE IS NO WAY BACK. Please confirm you understand this by setting the setting EXPERIMENTALV2_CONFIRM=true"); + } var builder = new WebHostBuilder() .UseKestrel() .UseConfiguration(conf) diff --git a/BTCPayServer/Properties/launchSettings.json b/BTCPayServer/Properties/launchSettings.json index 6c0d3e5cf..848529e7e 100644 --- a/BTCPayServer/Properties/launchSettings.json +++ b/BTCPayServer/Properties/launchSettings.json @@ -4,6 +4,7 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { + "EXPERIMENTALV2_CONFIRM": "true", "BTCPAY_NETWORK": "regtest", "BTCPAY_LAUNCHSETTINGS": "true", "BTCPAY_BTCLIGHTNING": "type=clightning;server=tcp://127.0.0.1:30993/", @@ -37,6 +38,7 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { + "EXPERIMENTALV2_CONFIRM": "true", "BTCPAY_NETWORK": "regtest", "BTCPAY_LAUNCHSETTINGS": "true", "BTCPAY_PORT": "14142", @@ -74,6 +76,7 @@ "commandName": "Project", "launchBrowser": true, "environmentVariables": { + "EXPERIMENTALV2_CONFIRM": "true", "BTCPAY_NETWORK": "regtest", "BTCPAY_LAUNCHSETTINGS": "true", "BTCPAY_PORT": "14142",