Closed ivmaykov closed 1 year ago
We can determine the currency (MAIN_NET or TEST_NET) by looking at the Base58-checked encoding of the public key returned from subzero core.
This addresses https://github.com/square/subzero/issues/254
Manually tested with a core binary built with both CURRENCY=btc-testnet and CURRENCY=btc-mainnet.
Test plan for TEST_NET:
cd core && rm -rf build && mkdir build && cd build && TARGET=dev CURRENCY=btc-testnet cmake ../ && ./subzero
cd java && rm -rf test-wallets && mkdir test-wallets && touch test-wallets/.subzero_702e63a9 && ./gradlew clean build && java -jar ./gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --wallet-dir ./test-wallets --generate-wallet-files-test
test-wallets/finalized/
Test plan for MAIN_NET:
CURRENCY=btc-mainnet
cd core && rm -rf build && mkdir build && cd build && TARGET=dev CURRENCY=btc-mainnet cmake ../ && ./subzero
We can determine the currency (MAIN_NET or TEST_NET) by looking at the Base58-checked encoding of the public key returned from subzero core.
This addresses https://github.com/square/subzero/issues/254
Manually tested with a core binary built with both CURRENCY=btc-testnet and CURRENCY=btc-mainnet.
Test plan for TEST_NET:
cd core && rm -rf build && mkdir build && cd build && TARGET=dev CURRENCY=btc-testnet cmake ../ && ./subzero
(leave this running)cd java && rm -rf test-wallets && mkdir test-wallets && touch test-wallets/.subzero_702e63a9 && ./gradlew clean build && java -jar ./gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --wallet-dir ./test-wallets --generate-wallet-files-test
(then type "yes" a bunch of times, ctrl-C when done)test-wallets/finalized/
have a currency field with the value "TEST_NET"Test plan for MAIN_NET:
CURRENCY=btc-mainnet
).cd core && rm -rf build && mkdir build && cd build && TARGET=dev CURRENCY=btc-mainnet cmake ../ && ./subzero
(leave this running)cd java && rm -rf test-wallets && mkdir test-wallets && touch test-wallets/.subzero_702e63a9 && ./gradlew clean build && java -jar ./gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --wallet-dir ./test-wallets --generate-wallet-files-test
(then type "yes" a bunch of times, ctrl-C when done)test-wallets/finalized/
have a currency field with the value "MAIN_NET"