mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 20:54:20 +01:00
Hotfix: Prevent ZMQ-based bitcoin wallet to panic (#383)
* Hotfix bct embedded wallet w/ ZMQ * Fixes
This commit is contained in:
committed by
GitHub
parent
0d2db92173
commit
247c8bcadf
@@ -226,7 +226,7 @@ func WithPollingBitcoind(host, user, pass string) WalletOption {
|
|||||||
User: bitcoindConfig.User,
|
User: bitcoindConfig.User,
|
||||||
Pass: bitcoindConfig.Pass,
|
Pass: bitcoindConfig.Pass,
|
||||||
},
|
},
|
||||||
"CONSERVATIVE",
|
"ECONOMICAL",
|
||||||
chainfee.AbsoluteFeePerKwFloor,
|
chainfee.AbsoluteFeePerKwFloor,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -298,6 +298,27 @@ func WithBitcoindZMQ(block, tx string, host, user, pass string) WalletOption {
|
|||||||
time.Sleep(1 * time.Second)
|
time.Sleep(1 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
estimator, err := chainfee.NewBitcoindEstimator(
|
||||||
|
rpcclient.ConnConfig{
|
||||||
|
Host: bitcoindConfig.Host,
|
||||||
|
User: bitcoindConfig.User,
|
||||||
|
Pass: bitcoindConfig.Pass,
|
||||||
|
},
|
||||||
|
"ECONOMICAL",
|
||||||
|
chainfee.AbsoluteFeePerKwFloor,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to create bitcoind fee estimator: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := withExtraAPI(&bitcoindRPCClient{chainClient})(s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := withFeeEstimator(estimator)(s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if err := withChainSource(chainClient)(s); err != nil {
|
if err := withChainSource(chainClient)(s); err != nil {
|
||||||
chainClient.Stop()
|
chainClient.Stop()
|
||||||
bitcoindConn.Stop()
|
bitcoindConn.Stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user