Skip to content

Commit

Permalink
fix: temporarily use boltz for broadcasting on mainchain aswell
Browse files Browse the repository at this point in the history
  • Loading branch information
jackstar12 committed Dec 16, 2024
1 parent 258b9f1 commit 453fc68
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rpcserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ func initOnchain(cfg *config.Config, boltzApi *boltz.Api, network *boltz.Network
// use boltz for broadcasting if no custom electrum or mempool is configured
chain.Liquid.Tx = onchain.NewBoltzTxProvider(boltzApi, boltz.CurrencyLiquid)
}
if electrumConfig.Btc.Url == "" && cfg.MempoolApi == "" {
// use boltz for broadcasting if no custom electrum or mempool is configured
chain.Btc.Tx = onchain.NewBoltzTxProvider(boltzApi, boltz.CurrencyBtc)
}

if network == boltz.Regtest && electrumConfig.Btc.Url == "" && electrumConfig.Liquid.Url == "" {
electrumConfig = onchain.RegtestElectrumConfig
Expand Down Expand Up @@ -429,7 +433,10 @@ func initOnchain(cfg *config.Config, boltzApi *boltz.Api, network *boltz.Network
logger.Info("mempool.space API: " + cfg.MempoolApi)
client := mempool.InitClient(cfg.MempoolApi)
chain.Btc.Blocks = client
chain.Btc.Tx = client
// dont override boltz tx provider
if chain.Btc.Tx == nil {
chain.Btc.Tx = client
}
}

if cfg.MempoolLiquidApi != "" {
Expand Down

0 comments on commit 453fc68

Please sign in to comment.