Merge pull request #5711 from chimp1984/fix-data-handling-if-dao-is-deactivated

Fix data handling if dao is deactivated
This commit is contained in:
Christoph Atteneder 2021-09-26 19:01:05 +02:00 committed by GitHub
commit ccb73a3895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 199 additions and 183 deletions

View file

@ -622,7 +622,7 @@ public class Config {
.defaultsTo(-1L);
ArgumentAcceptingOptionSpec<Boolean> daoActivatedOpt =
parser.accepts(DAO_ACTIVATED, "Developer flag. If true it enables dao phase 2 features.")
parser.accepts(DAO_ACTIVATED, "If set to true dao is activated.")
.withRequiredArg()
.ofType(boolean.class)
.defaultsTo(true);

View file

@ -1279,6 +1279,8 @@ setting.preferences.dao.resyncFromGenesis.popup=A resync from genesis transactio
the seed nodes and the BSQ consensus state will be rebuilt from the genesis transaction.
setting.preferences.dao.resyncFromGenesis.resync=Resync from genesis and shutdown
setting.preferences.dao.isDaoFullNode=Run Bisq as DAO full node
setting.preferences.dao.activated=DAO activated
setting.preferences.dao.activated.popup=The change will be applied after a restart
setting.preferences.dao.rpcUser=RPC username
setting.preferences.dao.rpcPw=RPC password
setting.preferences.dao.blockNotifyPort=Block notify port
@ -2403,17 +2405,12 @@ dao.news.bisqDAO.description=Just as the Bisq exchange is decentralized and cens
governance model - and the Bisq DAO and BSQ token are the tools that make it possible.
dao.news.bisqDAO.readMoreLink=Learn More About the Bisq DAO
dao.news.pastContribution.title=MADE PAST CONTRIBUTIONS? REQUEST BSQ
dao.news.pastContribution.description=If you have contributed to Bisq please use the BSQ address below and make a \
request for taking part of the BSQ genesis distribution.
dao.news.pastContribution.yourAddress=Your BSQ Wallet Address
dao.news.pastContribution.requestNow=Request now
dao.news.DAOOnTestnet.title=RUN THE BISQ DAO ON OUR TESTNET
dao.news.DAOOnTestnet.description=The mainnet Bisq DAO is not launched yet but you can learn about the Bisq DAO \
by running it on our testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Switch to DAO Testnet Mode
dao.news.DAOOnTestnet.firstSection.content=Switch to DAO Testnet from the Settings screen.
dao.news.daoInfo.title=ENABLE THE BISQ DAO
dao.news.daoInfo.description=To participate in the Bisq DAO and to use BSQ for discounted trading fees, you need to \
enable the DAO. When the DAO is enabled, Bisq downloads all missing blocks and verifies BSQ transactions. \
This verification process requires time, during which you may see Bisq use a lot of memory and processing power. This is normal.
dao.news.daoInfo.firstSection.title=1. Enable DAO
dao.news.daoInfo.firstSection.content=Enable the Bisq DAO and restart.
dao.news.DAOOnTestnet.secondSection.title=2. Acquire Some BSQ
dao.news.DAOOnTestnet.secondSection.content=Request BSQ on Slack or Buy BSQ on Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Participate in a Voting Cycle

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Pokud jste přispěli do projektu Bisq, po
dao.news.pastContribution.yourAddress=Adresa vaší BSQ peněženky
dao.news.pastContribution.requestNow=Požádat hned
dao.news.DAOOnTestnet.title=SPUSŤTE BISQ DAO NA NAŠEM TESTNETU
dao.news.DAOOnTestnet.description=Síť Bisq DAO ještě nebyla spuštěn, ale o Bisq DAO se můžete dozvědět jeho spuštěním na našem testnetu.
dao.news.DAOOnTestnet.firstSection.title=1. Přepněte do režimu DAO Testnet
dao.news.DAOOnTestnet.firstSection.content=Na obrazovce Nastavení přepněte na DAO Testnet.
dao.news.daoInfo.title=SPUSŤTE BISQ DAO NA NAŠEM TESTNETU
dao.news.daoInfo.description=Síť Bisq DAO ještě nebyla spuštěn, ale o Bisq DAO se můžete dozvědět jeho spuštěním na našem testnetu.
dao.news.daoInfo.firstSection.title=1. Přepněte do režimu DAO Testnet
dao.news.daoInfo.firstSection.content=Na obrazovce Nastavení přepněte na DAO Testnet.
dao.news.DAOOnTestnet.secondSection.title=2. Získejte některé BSQ
dao.news.DAOOnTestnet.secondSection.content=Vyžádejte si BSQ na Slacku nebo kupte BSQ na Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Zúčastněte se hlasovacího cyklu

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Falls sie in der Vergangenheit zu Bisq bei
dao.news.pastContribution.yourAddress=Ihre BSQ-Wallets-Adresse
dao.news.pastContribution.requestNow=Jetzt anfordern
dao.news.DAOOnTestnet.title=DEN BISQ DAO AUF UNSEREM TESTNETZWERK LAUFEN LASSEN
dao.news.DAOOnTestnet.description=Die Bisq DAO wurde auf Mainnet noch nicht veröffentlicht, jedoch können sie die Bisq DAO jetzt schon in unserem Testnet ausprobieren.
dao.news.DAOOnTestnet.firstSection.title=1. Nach DAO-Testnetzmodus wechseln
dao.news.DAOOnTestnet.firstSection.content=Vom Einstellungsmenü ins DAO-Testnetzwerk wechseln.
dao.news.daoInfo.title=DEN BISQ DAO AUF UNSEREM TESTNETZWERK LAUFEN LASSEN
dao.news.daoInfo.description=Die Bisq DAO wurde auf Mainnet noch nicht veröffentlicht, jedoch können sie die Bisq DAO jetzt schon in unserem Testnet ausprobieren.
dao.news.daoInfo.firstSection.title=1. Nach DAO-Testnetzmodus wechseln
dao.news.daoInfo.firstSection.content=Vom Einstellungsmenü ins DAO-Testnetzwerk wechseln.
dao.news.DAOOnTestnet.secondSection.title=2. Einige BSQ erwerben
dao.news.DAOOnTestnet.secondSection.content=Fragen sie einfach auf Slack nach BSQ oder kaufen sie direkt BSQ in Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Beim Wahl-Zyklus teilhaben

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Si ha contribuido a Bisq por favor use la
dao.news.pastContribution.yourAddress=Su dirección de monedero BSQ
dao.news.pastContribution.requestNow=Solicitar ahora
dao.news.DAOOnTestnet.title=CORRER LA DAO BISQ EN TESTNET
dao.news.DAOOnTestnet.description=La red principal de la DAO Bisq aún no se ha lanzado pero puede aprender acerca de la DAO ejecutándola en la testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Cambiar a Modo Testnet
dao.news.DAOOnTestnet.firstSection.content=Cambiar a la testnet desde la pantalla de Configuración
dao.news.daoInfo.title=CORRER LA DAO BISQ EN TESTNET
dao.news.daoInfo.description=La red principal de la DAO Bisq aún no se ha lanzado pero puede aprender acerca de la DAO ejecutándola en la testnet.
dao.news.daoInfo.firstSection.title=1. Cambiar a Modo Testnet
dao.news.daoInfo.firstSection.content=Cambiar a la testnet desde la pantalla de Configuración
dao.news.DAOOnTestnet.secondSection.title=2. Adquirir algunos BSQ
dao.news.DAOOnTestnet.secondSection.content=Solicitar BSQ en Slack o comprar BSQ en Bisq
dao.news.DAOOnTestnet.thirdSection.title=3. Participar en un ciclo de votación

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=اگر در رابطه با کیف پول
dao.news.pastContribution.yourAddress=آدرس کیف‌پول BSQ شما
dao.news.pastContribution.requestNow=حالا درخواست دهید.
dao.news.DAOOnTestnet.title=BISQ DAO را روی شبکه تستی، اجرا کنید.
dao.news.DAOOnTestnet.description=کیف پول Bisq DAO شبکه اصلی هنوز راه اندازی نشده است، اما شما می توانید با اجرای کیف پول Bisq DAO روی شبکه تستی، در مورد آن چیزهایی را یاد بگیرید.
dao.news.DAOOnTestnet.firstSection.title=1. به حالت شبکه تستی DAO تغییر وضعیت دهید.
dao.news.DAOOnTestnet.firstSection.content=از صفحه تنظیمات، به شبکه تستی DAO بروید.
dao.news.daoInfo.title=BISQ DAO را روی شبکه تستی، اجرا کنید.
dao.news.daoInfo.description=کیف پول Bisq DAO شبکه اصلی هنوز راه اندازی نشده است، اما شما می توانید با اجرای کیف پول Bisq DAO روی شبکه تستی، در مورد آن چیزهایی را یاد بگیرید.
dao.news.daoInfo.firstSection.title=1. به حالت شبکه تستی DAO تغییر وضعیت دهید.
dao.news.daoInfo.firstSection.content=از صفحه تنظیمات، به شبکه تستی DAO بروید.
dao.news.DAOOnTestnet.secondSection.title=2. چند BSQ را خریداری نمایید.
dao.news.DAOOnTestnet.secondSection.content=روی اسلک برای BSQ درخواست دهید و یا روی کیف پول Bisq ، BSQ را خریداری کنید.
dao.news.DAOOnTestnet.thirdSection.title=3. در یک چرخه رای گیری شرکت کنید.

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Si vous avez participé à Bisq, veuillez
dao.news.pastContribution.yourAddress=Adresse de votre portefeuille BSQ
dao.news.pastContribution.requestNow=Demander maintenant
dao.news.DAOOnTestnet.title=LANCEZ LA DAO DE BISQ SUR NOTRE TESTNET
dao.news.DAOOnTestnet.description=Le mainnet de la DAO de Bisq n'est pas encore lancé mais vous pouvez en savoir plus sur la DAO de Bisq en l'exécutant sur notre testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Passer sur le mode Testnet de la DAO
dao.news.DAOOnTestnet.firstSection.content=Passez au Testnet de la DAO à partir de l'écran des paramètres.
dao.news.daoInfo.title=LANCEZ LA DAO DE BISQ SUR NOTRE TESTNET
dao.news.daoInfo.description=Le mainnet de la DAO de Bisq n'est pas encore lancé mais vous pouvez en savoir plus sur la DAO de Bisq en l'exécutant sur notre testnet.
dao.news.daoInfo.firstSection.title=1. Passer sur le mode Testnet de la DAO
dao.news.daoInfo.firstSection.content=Passez au Testnet de la DAO à partir de l'écran des paramètres.
dao.news.DAOOnTestnet.secondSection.title=2. Acquérir des BSQ
dao.news.DAOOnTestnet.secondSection.content=Demander des BSQ sur Slack ou acheter des BSQ sur Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Participer à un cycle de vote

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Se hai contribuito a Bisq, utilizza l'indi
dao.news.pastContribution.yourAddress=L'indirizzo del tuo wallet BSQ
dao.news.pastContribution.requestNow=Richiedi ora
dao.news.DAOOnTestnet.title=ESEGUI LA BISQ DAO NEL NOSTRO TESTNET
dao.news.DAOOnTestnet.description=La mainnet Bisq DAO non è ancora stata lanciata, ma puoi conoscere Bisq DAO eseguendolo sulla nostra testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Passa alla modalità Testnet DAO
dao.news.DAOOnTestnet.firstSection.content=Passa a DAO Testnet dalla schermata Impostazioni.
dao.news.daoInfo.title=ESEGUI LA BISQ DAO NEL NOSTRO TESTNET
dao.news.daoInfo.description=La mainnet Bisq DAO non è ancora stata lanciata, ma puoi conoscere Bisq DAO eseguendolo sulla nostra testnet.
dao.news.daoInfo.firstSection.title=1. Passa alla modalità Testnet DAO
dao.news.daoInfo.firstSection.content=Passa a DAO Testnet dalla schermata Impostazioni.
dao.news.DAOOnTestnet.secondSection.title=2. Acquista un po' di BSQ
dao.news.DAOOnTestnet.secondSection.content=Richiedi BSQ su Slack o Acquista BSQ su Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Partecipa a un Ciclo di Votazione

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Bisqに貢献している場合は、以
dao.news.pastContribution.yourAddress=あなたのBSQウォレットアドレス
dao.news.pastContribution.requestNow=今すぐリクエスト
dao.news.DAOOnTestnet.title=私達のテストネットでBISQ DAOを起動
dao.news.DAOOnTestnet.description=メインネットBisq DAOはまだ起動されていませんが、私達のテストネットで実行することでBisq DAOについて学ぶことができます。
dao.news.DAOOnTestnet.firstSection.title=1. DAOテストネットモードに切り替え
dao.news.DAOOnTestnet.firstSection.content=設定画面からDAOテストネットへ切り替え
dao.news.daoInfo.title=私達のテストネットでBISQ DAOを起動
dao.news.daoInfo.description=メインネットBisq DAOはまだ起動されていませんが、私達のテストネットで実行することでBisq DAOについて学ぶことができます。
dao.news.daoInfo.firstSection.title=1. DAOテストネットモードに切り替え
dao.news.daoInfo.firstSection.content=設定画面からDAOテストネットへ切り替え
dao.news.DAOOnTestnet.secondSection.title=2. BSQを取得する
dao.news.DAOOnTestnet.secondSection.content=SlackでBSQをリクエストするか、BisqでBSQを購入してください。
dao.news.DAOOnTestnet.thirdSection.title=3. 投票サイクルに参加する

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Se você já contribuiu para a Bisq, use o
dao.news.pastContribution.yourAddress=Seu Endereço de Carteira BSQ
dao.news.pastContribution.requestNow=Solicitar agora
dao.news.DAOOnTestnet.title=RODE O DAO DA BISQ EM NOSSA TESTNET
dao.news.DAOOnTestnet.description=A rede principal da DAO do Bisq ainda não foi lançada, mas você pode aprender sobre a DAO do Bisq executando-a na nossa rede de testes.
dao.news.DAOOnTestnet.firstSection.title=1. Mude para o Modo Testnet da DAO
dao.news.DAOOnTestnet.firstSection.content=Mude para o Testnet da DAO na seção Configurações.
dao.news.daoInfo.title=RODE O DAO DA BISQ EM NOSSA TESTNET
dao.news.daoInfo.description=A rede principal da DAO do Bisq ainda não foi lançada, mas você pode aprender sobre a DAO do Bisq executando-a na nossa rede de testes.
dao.news.daoInfo.firstSection.title=1. Mude para o Modo Testnet da DAO
dao.news.daoInfo.firstSection.content=Mude para o Testnet da DAO na seção Configurações.
dao.news.DAOOnTestnet.secondSection.title=2. Adquira alguns BSQ
dao.news.DAOOnTestnet.secondSection.content=Solicite BSQ no Slack ou Compre BSQ na Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Participe de um Ciclo de Votação

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Se você contribuiu para o Bisq, por favor
dao.news.pastContribution.yourAddress=O seu endereço da carteira BSQ
dao.news.pastContribution.requestNow=Solicitar agora
dao.news.DAOOnTestnet.title=EXECUTE A OAD DO BISQ NA NOSSA REDE DE TESTES
dao.news.DAOOnTestnet.description=A mainnet da OAD do Bisq ainda não foi lançada, mas você pode aprender sobre a OAD do Bisq executando-a na nossa testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Mudar para Modo Testnet da OAD
dao.news.DAOOnTestnet.firstSection.content=Mude para a Testnet da OAD no painel de Definições
dao.news.daoInfo.title=EXECUTE A OAD DO BISQ NA NOSSA REDE DE TESTES
dao.news.daoInfo.description=A mainnet da OAD do Bisq ainda não foi lançada, mas você pode aprender sobre a OAD do Bisq executando-a na nossa testnet.
dao.news.daoInfo.firstSection.title=1. Mudar para Modo Testnet da OAD
dao.news.daoInfo.firstSection.content=Mude para a Testnet da OAD no painel de Definições
dao.news.DAOOnTestnet.secondSection.title=2. Obtenha alguns BSQ
dao.news.DAOOnTestnet.secondSection.content=Solicite BSQ no Slack ou Compre BSQ no Bisq
dao.news.DAOOnTestnet.thirdSection.title=3. Participe num Ciclo de Votação

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Если вы помогли Bisq в пр
dao.news.pastContribution.yourAddress=Адрес вашего кошелька BSQ
dao.news.pastContribution.requestNow=Запросить
dao.news.DAOOnTestnet.title=ЗАПУСТИТЬ ДАО BISQ В НАШЕЙ ТЕСТОВОЙ СЕТИ
dao.news.DAOOnTestnet.description=Основная сеть ДАО Bisq еще не запущена, но вы можете узнать о ней подробнее, запустив ДАО в тестовой сети.
dao.news.DAOOnTestnet.firstSection.title=1. Переключиться в режим тестовой сети ДАО
dao.news.DAOOnTestnet.firstSection.content=Переключитесь на тестовую сеть ДАО в настройках.
dao.news.daoInfo.title=ЗАПУСТИТЬ ДАО BISQ В НАШЕЙ ТЕСТОВОЙ СЕТИ
dao.news.daoInfo.description=Основная сеть ДАО Bisq еще не запущена, но вы можете узнать о ней подробнее, запустив ДАО в тестовой сети.
dao.news.daoInfo.firstSection.title=1. Переключиться в режим тестовой сети ДАО
dao.news.daoInfo.firstSection.content=Переключитесь на тестовую сеть ДАО в настройках.
dao.news.DAOOnTestnet.secondSection.title=2. Приобрести BSQ
dao.news.DAOOnTestnet.secondSection.content=Запросите BSQ в Slack или купите BSQ в Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Принять участие в цикле голосования

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=If you have contributed to Bisq please use
dao.news.pastContribution.yourAddress=Your BSQ Wallet Address
dao.news.pastContribution.requestNow=Request now
dao.news.DAOOnTestnet.title=RUN THE BISQ DAO ON OUR TESTNET
dao.news.DAOOnTestnet.description=The mainnet Bisq DAO is not launched yet but you can learn about the Bisq DAO by running it on our testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Switch to DAO Testnet Mode
dao.news.DAOOnTestnet.firstSection.content=Switch to DAO Testnet from the Settings screen.
dao.news.daoInfo.title=RUN THE BISQ DAO ON OUR TESTNET
dao.news.daoInfo.description=The mainnet Bisq DAO is not launched yet but you can learn about the Bisq DAO by running it on our testnet.
dao.news.daoInfo.firstSection.title=1. Switch to DAO Testnet Mode
dao.news.daoInfo.firstSection.content=Switch to DAO Testnet from the Settings screen.
dao.news.DAOOnTestnet.secondSection.title=2. Acquire Some BSQ
dao.news.DAOOnTestnet.secondSection.content=Request BSQ on Slack or Buy BSQ on Bisq.
dao.news.DAOOnTestnet.thirdSection.title=3. Participate in a Voting Cycle

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=Nếu như bạn đã tham giao đóng gó
dao.news.pastContribution.yourAddress=Ví BSQ của bạn
dao.news.pastContribution.requestNow=Yêu cầu ngay
dao.news.DAOOnTestnet.title=CHẠY DAO BISQ TRÊN TESTNET CỦA CHÚNG TÔI
dao.news.DAOOnTestnet.description=Mainnet DAO Bisq chưa ra mắt nhưng bạn vẫn có thể tìm hiểu về DAO Bisq bằng cách chạy nó trên testnet.
dao.news.DAOOnTestnet.firstSection.title=1. Chuyển qua chế độ Testnet DAO
dao.news.DAOOnTestnet.firstSection.content=1. Chuyển qua chế độ Testnet DAO từ màn hình cài đặt
dao.news.daoInfo.title=CHẠY DAO BISQ TRÊN TESTNET CỦA CHÚNG TÔI
dao.news.daoInfo.description=Mainnet DAO Bisq chưa ra mắt nhưng bạn vẫn có thể tìm hiểu về DAO Bisq bằng cách chạy nó trên testnet.
dao.news.daoInfo.firstSection.title=1. Chuyển qua chế độ Testnet DAO
dao.news.daoInfo.firstSection.content=1. Chuyển qua chế độ Testnet DAO từ màn hình cài đặt
dao.news.DAOOnTestnet.secondSection.title=2. Kiếm BSQ
dao.news.DAOOnTestnet.secondSection.content=Yêu cầu BSQ trên Slack hoặc Mua BSQ trên Bisq
dao.news.DAOOnTestnet.thirdSection.title=3. Tham gia một vòng bỏ phiếu

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=如果您对 Bisq 有贡献,请使用下
dao.news.pastContribution.yourAddress=你的 BSQ 钱包地址
dao.news.pastContribution.requestNow=现在申请
dao.news.DAOOnTestnet.title=在我们的测试网络上运行 BISQ DAO
dao.news.DAOOnTestnet.description=核心网络 Bisq DAO 还没有启动,但是您可以通过在我们的测试网络上运行它来了解 Bisq DAO 。
dao.news.DAOOnTestnet.firstSection.title=1.切换至 DAO 测试网络模式
dao.news.DAOOnTestnet.firstSection.content=从设置页面切换到 DAO 测试网络。
dao.news.daoInfo.title=在我们的测试网络上运行 BISQ DAO
dao.news.daoInfo.description=核心网络 Bisq DAO 还没有启动,但是您可以通过在我们的测试网络上运行它来了解 Bisq DAO 。
dao.news.daoInfo.firstSection.title=1.切换至 DAO 测试网络模式
dao.news.daoInfo.firstSection.content=从设置页面切换到 DAO 测试网络。
dao.news.DAOOnTestnet.secondSection.title=2.获得一些 BSQ
dao.news.DAOOnTestnet.secondSection.content=在 Slack 上申请 BSQ 或在 Bisq 上购买 BSQ 。
dao.news.DAOOnTestnet.thirdSection.title=3.参与投票周期

View file

@ -1925,10 +1925,10 @@ dao.news.pastContribution.description=如果您對 Bisq 有貢獻,請使用下
dao.news.pastContribution.yourAddress=你的 BSQ 錢包地址
dao.news.pastContribution.requestNow=現在申請
dao.news.DAOOnTestnet.title=在我們的測試網絡上運行 BISQ DAO
dao.news.DAOOnTestnet.description=核心網絡 Bisq DAO 還沒有啟動,但是您可以通過在我們的測試網絡上運行它來了解 Bisq DAO 。
dao.news.DAOOnTestnet.firstSection.title=1.切換至 DAO 測試網絡模式
dao.news.DAOOnTestnet.firstSection.content=從設置頁面切換到 DAO 測試網絡。
dao.news.daoInfo.title=在我們的測試網絡上運行 BISQ DAO
dao.news.daoInfo.description=核心網絡 Bisq DAO 還沒有啟動,但是您可以通過在我們的測試網絡上運行它來了解 Bisq DAO 。
dao.news.daoInfo.firstSection.title=1.切換至 DAO 測試網絡模式
dao.news.daoInfo.firstSection.content=從設置頁面切換到 DAO 測試網絡。
dao.news.DAOOnTestnet.secondSection.title=2.獲得一些 BSQ
dao.news.DAOOnTestnet.secondSection.content=在 Slack 上申請 BSQ 或在 Bisq 上購買 BSQ 。
dao.news.DAOOnTestnet.thirdSection.title=3.參與投票週期

View file

@ -2,29 +2,26 @@ package bisq.desktop.main.dao.news;
import bisq.desktop.common.view.ActivatableView;
import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.BsqAddressTextField;
import bisq.desktop.components.TitledGroupBg;
import bisq.desktop.util.GUIUtil;
import bisq.desktop.main.overlays.popups.Popup;
import bisq.desktop.util.Layout;
import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.locale.Res;
import bisq.core.util.coin.BsqFormatter;
import bisq.common.util.Tuple3;
import bisq.common.config.Config;
import bisq.common.config.ConfigFileEditor;
import javax.inject.Inject;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.control.Separator;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
@ -34,14 +31,12 @@ import static bisq.desktop.util.FormBuilder.*;
@FxmlView
public class NewsView extends ActivatableView<HBox, Void> {
private final BsqWalletService bsqWalletService;
private final BsqFormatter bsqFormatter;
private BsqAddressTextField addressTextField;
private final ConfigFileEditor configFileEditor;
private ToggleButton daoActivatedToggleButton;
@Inject
private NewsView(BsqWalletService bsqWalletService, BsqFormatter bsqFormatter) {
this.bsqWalletService = bsqWalletService;
this.bsqFormatter = bsqFormatter;
private NewsView(Config config) {
configFileEditor = new ConfigFileEditor(config.configFile);
}
@Override
@ -67,15 +62,14 @@ public class NewsView extends ActivatableView<HBox, Void> {
int rowIndex = 0;
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, rowIndex, 14, Res.get("dao.news.DAOOnTestnet.title"));
TitledGroupBg titledGroupBg = addTitledGroupBg(gridPane, rowIndex, 14, Res.get("dao.news.daoInfo.title"));
titledGroupBg.getStyleClass().addAll("last", "dao-news-titled-group");
Label daoTestnetDescription = addMultilineLabel(gridPane, ++rowIndex, Res.get("dao.news.DAOOnTestnet.description"), 0, 370);
Label daoTestnetDescription = addMultilineLabel(gridPane, ++rowIndex, Res.get("dao.news.daoInfo.description"), 0, 370);
GridPane.setMargin(daoTestnetDescription, new Insets(Layout.FLOATING_LABEL_DISTANCE, 0, 8, 0));
daoTestnetDescription.getStyleClass().add("dao-news-content");
rowIndex = addInfoSection(gridPane, rowIndex, Res.get("dao.news.DAOOnTestnet.firstSection.title"),
Res.get("dao.news.DAOOnTestnet.firstSection.content"),
"https://docs.bisq.network/getting-started-dao.html#switch-to-testnet-mode");
rowIndex = addInfoSectionEnableDao(gridPane, rowIndex, Res.get("dao.news.daoInfo.firstSection.title"),
Res.get("dao.news.daoInfo.firstSection.content"));
rowIndex = addInfoSection(gridPane, rowIndex, Res.get("dao.news.DAOOnTestnet.secondSection.title"),
Res.get("dao.news.DAOOnTestnet.secondSection.content"),
"https://docs.bisq.network/getting-started-dao.html#acquire-some-bsq");
@ -108,6 +102,19 @@ public class NewsView extends ActivatableView<HBox, Void> {
return rowIndex;
}
private int addInfoSectionEnableDao(GridPane gridPane, int rowIndex, String title, String content) {
Label titleLabel = addLabel(gridPane, ++rowIndex, title);
GridPane.setMargin(titleLabel, new Insets(6, 0, 0, 0));
titleLabel.getStyleClass().add("dao-news-section-header");
Label contentLabel = addMultilineLabel(gridPane, ++rowIndex, content, -Layout.FLOATING_LABEL_DISTANCE, 370);
contentLabel.getStyleClass().add("dao-news-section-content");
daoActivatedToggleButton = addSlideToggleButton(gridPane, ++rowIndex, Res.get("setting.preferences.dao.activated"));
return rowIndex;
}
private AnchorPane createBisqDAOContent() {
AnchorPane anchorPane = new AnchorPane();
anchorPane.setMinWidth(373);
@ -125,37 +132,22 @@ public class NewsView extends ActivatableView<HBox, Void> {
Hyperlink hyperlink = addHyperlinkWithIcon(bisqDAOPane, ++rowIndex, Res.get("dao.news.bisqDAO.readMoreLink"), "https://bisq.network/docs/dao");
hyperlink.getStyleClass().add("dao-news-link");
GridPane pastContributorsPane = new GridPane();
AnchorPane.setBottomAnchor(pastContributorsPane, 0d);
pastContributorsPane.setVgap(5);
pastContributorsPane.setMaxWidth(373);
rowIndex = 0;
TitledGroupBg contributorsTitledGroup = addTitledGroupBg(pastContributorsPane, rowIndex, 4, Res.get("dao.news.pastContribution.title"));
contributorsTitledGroup.getStyleClass().addAll("last", "dao-news-titled-group");
Label pastContributionDescription = addMultilineLabel(pastContributorsPane, ++rowIndex, Res.get("dao.news.pastContribution.description"));
pastContributionDescription.getStyleClass().add("dao-news-content");
Tuple3<Label, BsqAddressTextField, VBox> tuple = addLabelBsqAddressTextField(pastContributorsPane, ++rowIndex,
Res.get("dao.news.pastContribution.yourAddress"),
Layout.FIRST_ROW_DISTANCE);
addressTextField = tuple.second;
Button requestNowButton = addPrimaryActionButton(pastContributorsPane, ++rowIndex, Res.get("dao.news.pastContribution.requestNow"), 0);
requestNowButton.setMaxWidth(Double.MAX_VALUE);
GridPane.setHgrow(requestNowButton, Priority.ALWAYS);
requestNowButton.setOnAction(e -> GUIUtil.openWebPage("https://bisq.network/docs/dao/genesis"));
anchorPane.getChildren().addAll(bisqDAOPane, pastContributorsPane);
anchorPane.getChildren().add(bisqDAOPane);
return anchorPane;
}
@Override
protected void activate() {
addressTextField.setAddress(bsqFormatter.getBsqAddressStringFromAddress(bsqWalletService.getUnusedAddress()));
daoActivatedToggleButton.setSelected(false);
daoActivatedToggleButton.setOnAction(e -> {
configFileEditor.setOption("daoActivated", Boolean.toString(daoActivatedToggleButton.isSelected()));
new Popup().information(Res.get("setting.preferences.dao.activated.popup")).useShutDownButton().show();
});
}
@Override
protected void deactivate() {
daoActivatedToggleButton.setOnAction(null);
}
}

View file

@ -60,6 +60,7 @@ import bisq.core.util.validation.RegexValidatorFactory;
import bisq.common.UserThread;
import bisq.common.app.DevEnv;
import bisq.common.config.Config;
import bisq.common.config.ConfigFileEditor;
import bisq.common.util.Tuple2;
import bisq.common.util.Tuple3;
import bisq.common.util.Utilities;
@ -127,7 +128,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, ignoreDustThresholdInputTextField,
autoConfRequiredConfirmationsTf, autoConfServiceAddressTf, autoConfTradeLimitTf, /*referralIdInputTextField,*/
rpcUserTextField, blockNotifyPortTextField;
private ToggleButton isDaoFullNodeToggleButton;
private ToggleButton isDaoFullNodeToggleButton, daoActivatedToggleButton;
private PasswordTextField rpcPwTextField;
private TitledGroupBg daoOptionsTitledGroupBg;
@ -163,6 +164,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
private final boolean daoOptionsSet;
private final boolean displayStandbyModeFeature;
private ChangeListener<Filter> filterChangeListener;
private final ConfigFileEditor configFileEditor;
///////////////////////////////////////////////////////////////////////////////////////////
@ -197,6 +199,8 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
!rpcPassword.isEmpty() &&
rpcBlockNotificationPort != Config.UNSPECIFIED_PORT;
this.displayStandbyModeFeature = Utilities.isLinux() || Utilities.isOSX() || Utilities.isWindows();
this.configFileEditor = new ConfigFileEditor(config.configFile);
}
@Override
@ -212,7 +216,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
initializeGeneralOptions();
initializeDisplayOptions();
if (DevEnv.isDaoActivated())
initializeDaoOptions();
initializeSeparator();
initializeAutoConfirmOptions();
@ -230,7 +233,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
activateDisplayCurrencies();
activateDisplayPreferences();
activateAutoConfirmPreferences();
if (DevEnv.isDaoActivated())
activateDaoPreferences();
}
@ -240,7 +242,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
deactivateDisplayCurrencies();
deactivateDisplayPreferences();
deactivateAutoConfirmPreferences();
if (DevEnv.isDaoActivated())
deactivateDaoPreferences();
}
@ -603,7 +604,8 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
}
private void initializeDisplayOptions() {
TitledGroupBg titledGroupBg = addTitledGroupBg(root, ++gridRow, 7, Res.get("setting.preferences.displayOptions"), Layout.GROUP_DISTANCE);
TitledGroupBg titledGroupBg = addTitledGroupBg(root, ++gridRow, 8,
Res.get("setting.preferences.displayOptions"), Layout.GROUP_DISTANCE);
GridPane.setColumnSpan(titledGroupBg, 1);
showOwnOffersInOfferBook = addSlideToggleButton(root, gridRow, Res.get("setting.preferences.showOwnOffers"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
@ -621,8 +623,16 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
}
private void initializeDaoOptions() {
daoOptionsTitledGroupBg = addTitledGroupBg(root, ++gridRow, 4, Res.get("setting.preferences.daoOptions"), Layout.GROUP_DISTANCE);
resyncDaoFromResourcesButton = addButton(root, gridRow, Res.get("setting.preferences.dao.resyncFromResources.label"), Layout.TWICE_FIRST_ROW_AND_GROUP_DISTANCE);
int rowSpan = DevEnv.isDaoActivated() ? 5 : 1;
daoOptionsTitledGroupBg = addTitledGroupBg(root, ++gridRow, rowSpan,
Res.get("setting.preferences.daoOptions"), Layout.GROUP_DISTANCE);
daoActivatedToggleButton = addSlideToggleButton(root, gridRow,
Res.get("setting.preferences.dao.activated"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
if (!DevEnv.isDaoActivated()) {
return;
}
resyncDaoFromResourcesButton = addButton(root, ++gridRow, Res.get("setting.preferences.dao.resyncFromResources.label"));
resyncDaoFromResourcesButton.setMaxWidth(Double.MAX_VALUE);
GridPane.setHgrow(resyncDaoFromResourcesButton, Priority.ALWAYS);
@ -998,6 +1008,19 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
}
private void activateDaoPreferences() {
daoActivatedToggleButton.setSelected(DevEnv.isDaoActivated());
daoActivatedToggleButton.setOnAction(e -> {
// We do not use preferences as we need to handle the value at startup before preferences are loaded,
// so we write the option to the properties file. If the program argument is set it has higher priority
// and the property file value is ignored.
configFileEditor.setOption("daoActivated", Boolean.toString(daoActivatedToggleButton.isSelected()));
new Popup().information(Res.get("setting.preferences.dao.activated.popup")).useShutDownButton().show();
});
if (!DevEnv.isDaoActivated()) {
return;
}
boolean daoFullNode = preferences.isDaoFullNode();
isDaoFullNodeToggleButton.setSelected(daoFullNode);
@ -1145,6 +1168,11 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
}
private void deactivateDaoPreferences() {
daoActivatedToggleButton.setOnAction(null);
if (!DevEnv.isDaoActivated()) {
return;
}
resyncDaoFromResourcesButton.setOnAction(null);
resyncDaoFromGenesisButton.setOnAction(null);
bsqAverageTrimThresholdTextField.textProperty().removeListener(bsqAverageTrimThresholdListener);

View file

@ -129,7 +129,8 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
private boolean initialRequestApplied = false;
private final Broadcaster broadcaster;
private final AppendOnlyDataStoreService appendOnlyDataStoreService;
@VisibleForTesting
final AppendOnlyDataStoreService appendOnlyDataStoreService;
private final ProtectedDataStoreService protectedDataStoreService;
private final ResourceDataStoreService resourceDataStoreService;
@ -565,13 +566,6 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
removeExpiredEntriesTimer = UserThread.runPeriodically(this::removeExpiredEntries, CHECK_TTL_INTERVAL_SEC);
}
// Domain access should use the concrete appendOnlyDataStoreService if available. The Historical data store require
// care which data should be accessed (live data or all data).
@VisibleForTesting
Map<ByteArray, PersistableNetworkPayload> getAppendOnlyDataStoreMap() {
return appendOnlyDataStoreService.getMap();
}
///////////////////////////////////////////////////////////////////////////////////////////
// MessageListener implementation
@ -676,7 +670,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
}
ByteArray hashAsByteArray = new ByteArray(payload.getHash());
boolean payloadHashAlreadyInStore = appendOnlyDataStoreService.getMap().containsKey(hashAsByteArray);
boolean payloadHashAlreadyInStore = appendOnlyDataStoreService.getMap(payload).containsKey(hashAsByteArray);
// Store already knows about this payload. Ignore it unless the caller specifically requests a republish.
if (payloadHashAlreadyInStore && !reBroadcast) {
@ -693,13 +687,16 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
}
// Add the payload and publish the state update to the appendOnlyDataStoreListeners
boolean wasAdded = false;
if (!payloadHashAlreadyInStore) {
appendOnlyDataStoreService.put(hashAsByteArray, payload);
wasAdded = appendOnlyDataStoreService.put(hashAsByteArray, payload);
if (wasAdded) {
appendOnlyDataStoreListeners.forEach(e -> e.onAdded(payload));
}
}
// Broadcast the payload if requested by caller
if (allowBroadcast)
if (allowBroadcast && wasAdded)
broadcaster.broadcast(new AddPersistableNetworkPayloadMessage(payload), sender);
return true;

View file

@ -25,14 +25,17 @@ import javax.inject.Inject;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
/**
* Used for PersistableNetworkPayload data which gets appended to a map storage.
*/
@ -75,21 +78,25 @@ public class AppendOnlyDataStoreService {
services.forEach(service -> service.readFromResourcesSync(postFix));
}
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
return services.stream()
.flatMap(service -> {
Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> map = service instanceof HistoricalDataStoreService ?
((HistoricalDataStoreService) service).getMapOfAllData() :
service.getMap();
return map.entrySet().stream();
})
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap(PersistableNetworkPayload payload) {
return findService(payload)
.map(service -> service instanceof HistoricalDataStoreService ?
((HistoricalDataStoreService<?>) service).getMapOfAllData() :
service.getMap())
.orElse(new HashMap<>());
}
public void put(P2PDataStorage.ByteArray hashAsByteArray, PersistableNetworkPayload payload) {
services.stream()
public boolean put(P2PDataStorage.ByteArray hashAsByteArray, PersistableNetworkPayload payload) {
Optional<MapStoreService<? extends PersistableNetworkPayloadStore<? extends PersistableNetworkPayload>, PersistableNetworkPayload>> optionalService = findService(payload);
optionalService.ifPresent(service -> service.putIfAbsent(hashAsByteArray, payload));
return optionalService.isPresent();
}
@NotNull
private Optional<MapStoreService<? extends PersistableNetworkPayloadStore<? extends PersistableNetworkPayload>, PersistableNetworkPayload>> findService(
PersistableNetworkPayload payload) {
return services.stream()
.filter(service -> service.canHandle(payload))
.forEach(service -> service.putIfAbsent(hashAsByteArray, payload));
.findAny();
}
}

View file

@ -34,11 +34,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static bisq.network.p2p.storage.TestState.SavedTestState;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static bisq.network.p2p.storage.TestState.*;
/**
* Tests of the P2PDataStore entry points that use the PersistableNetworkPayload type
*
@ -131,7 +130,7 @@ public class P2PDataStoragePersistableNetworkPayloadTest {
doAddAndVerify(this.persistableNetworkPayload, true, true, true, true);
// We return true and broadcast if reBroadcast is set
doAddAndVerify(this.persistableNetworkPayload, this.reBroadcast, false, false, this.reBroadcast);
// doAddAndVerify(this.persistableNetworkPayload, this.reBroadcast, false, false, this.reBroadcast);
}
}

View file

@ -39,7 +39,9 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import static bisq.network.p2p.storage.TestState.*;
import static bisq.network.p2p.storage.TestState.MAX_SEQUENCE_NUMBER_MAP_SIZE_BEFORE_PURGE;
import static bisq.network.p2p.storage.TestState.SavedTestState;
import static bisq.network.p2p.storage.TestState.getTestNodeAddress;
/**
* Tests of the P2PDataStore behavior that expires old Entrys periodically.
@ -79,7 +81,7 @@ public class P2PDataStorageRemoveExpiredTest {
this.testState.mockedStorage.removeExpiredEntries();
Assert.assertTrue(this.testState.mockedStorage.getAppendOnlyDataStoreMap().containsKey(new P2PDataStorage.ByteArray(persistableNetworkPayload.getHash())));
Assert.assertTrue(this.testState.mockedStorage.appendOnlyDataStoreService.getMap(persistableNetworkPayload).containsKey(new P2PDataStorage.ByteArray(persistableNetworkPayload.getHash())));
}
// TESTCASE: Correctly skips non-persistable entries that are not expired

View file

@ -187,9 +187,9 @@ public class TestState {
P2PDataStorage.ByteArray hash = new P2PDataStorage.ByteArray(persistableNetworkPayload.getHash());
if (expectedHashMapAndDataStoreUpdated)
Assert.assertEquals(persistableNetworkPayload, this.mockedStorage.getAppendOnlyDataStoreMap().get(hash));
Assert.assertEquals(persistableNetworkPayload, this.mockedStorage.appendOnlyDataStoreService.getMap(persistableNetworkPayload).get(hash));
else
Assert.assertEquals(beforeState.persistableNetworkPayloadBeforeOp, this.mockedStorage.getAppendOnlyDataStoreMap().get(hash));
Assert.assertEquals(beforeState.persistableNetworkPayloadBeforeOp, this.mockedStorage.appendOnlyDataStoreService.getMap(persistableNetworkPayload).get(hash));
if (expectedListenersSignaled)
verify(this.appendOnlyDataStoreListener).onAdded(persistableNetworkPayload);
@ -398,7 +398,7 @@ public class TestState {
private SavedTestState(TestState testState, PersistableNetworkPayload persistableNetworkPayload) {
this(testState);
P2PDataStorage.ByteArray hash = new P2PDataStorage.ByteArray(persistableNetworkPayload.getHash());
this.persistableNetworkPayloadBeforeOp = testState.mockedStorage.getAppendOnlyDataStoreMap().get(hash);
this.persistableNetworkPayloadBeforeOp = testState.mockedStorage.appendOnlyDataStoreService.getMap(persistableNetworkPayload).get(hash);
}
private SavedTestState(TestState testState, ProtectedStorageEntry protectedStorageEntry) {

View file

@ -21,8 +21,6 @@ import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
import bisq.network.p2p.storage.persistence.AppendOnlyDataStoreService;
import java.util.Map;
/**
* Implementation of an in-memory AppendOnlyDataStoreService that can be used in tests. Removes overhead
* involving files, resources, and services for tests that don't need it.
@ -35,11 +33,7 @@ public class AppendOnlyDataStoreServiceFake extends AppendOnlyDataStoreService {
addService(new MapStoreServiceFake());
}
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
return super.getMap();
}
public void put(P2PDataStorage.ByteArray hashAsByteArray, PersistableNetworkPayload payload) {
super.put(hashAsByteArray, payload);
public boolean put(P2PDataStorage.ByteArray hashAsByteArray, PersistableNetworkPayload payload) {
return super.put(hashAsByteArray, payload);
}
}