From 7b113bd20aa6699e80946d92c82f6cdaa4c3b15b Mon Sep 17 00:00:00 2001 From: Charlie Chen Date: Fri, 29 Nov 2024 12:48:02 -0600 Subject: [PATCH] use chain name as bitcoin database suffix for regnet, signet and testnet4 --- zetaclient/orchestrator/bootstap_test.go | 6 +++--- zetaclient/orchestrator/bootstrap.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zetaclient/orchestrator/bootstap_test.go b/zetaclient/orchestrator/bootstap_test.go index 95c52beeee..99f58b9e5b 100644 --- a/zetaclient/orchestrator/bootstap_test.go +++ b/zetaclient/orchestrator/bootstap_test.go @@ -414,17 +414,17 @@ func TestBtcDatabaseFileName(t *testing.T) { { name: "should use new file name for bitcoin regtest", chain: chains.BitcoinRegtest, - expected: "btc_chain_client_18444", + expected: "btc_chain_client_btc_regtest", }, { name: "should use new file name for bitcoin signet", chain: chains.BitcoinSignetTestnet, - expected: "btc_chain_client_18333", + expected: "btc_chain_client_btc_signet_testnet", }, { name: "should use new file name for bitcoin testnet4", chain: chains.BitcoinTestnet4, - expected: "btc_chain_client_18334", + expected: "btc_chain_client_btc_testnet4", }, } diff --git a/zetaclient/orchestrator/bootstrap.go b/zetaclient/orchestrator/bootstrap.go index 86d6325ed5..77793d341b 100644 --- a/zetaclient/orchestrator/bootstrap.go +++ b/zetaclient/orchestrator/bootstrap.go @@ -489,7 +489,7 @@ func btcDatabaseFileName(chain chains.Chain) string { case chains.BitcoinMainnet.ChainId, chains.BitcoinTestnet.ChainId: return legacyBTCDatabaseFilename default: - return fmt.Sprintf("%s_%d", legacyBTCDatabaseFilename, chain.ChainId) + return fmt.Sprintf("%s_%s", legacyBTCDatabaseFilename, chain.Name) } }