Skip to content

Commit

Permalink
use chain name as bitcoin database suffix for regnet, signet and test…
Browse files Browse the repository at this point in the history
…net4
  • Loading branch information
ws4charlie committed Nov 29, 2024
1 parent 54b452f commit 7b113bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions zetaclient/orchestrator/bootstap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}

Expand Down
2 changes: 1 addition & 1 deletion zetaclient/orchestrator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 7b113bd

Please sign in to comment.