babylonchain / babylon-finality-gadget

3 stars 3 forks source link

feat: add `BitcoinRpc` into `sdk.Config` #39

Closed lesterli closed 4 months ago

lesterli commented 4 months ago

Summary

This PR adds BitcoinRpc into sdk.Config which makes the Bitcoin RPC URL configurable.

Test Plan

make lint
make test
make run
bap2pecs commented 4 months ago

let's also add a config.Validate() method to check the config passed into sdk.NewClient is valid:

lesterli commented 4 months ago

Just wanted to understand the context. Why not use btc client like https://github.com/babylonchain/staking-indexer/blob/51d98f1dbafda2fbbe550599c83331b549d26a6c/btcclient/client.go#L23?

We didn't know this BTC client before, created an issue https://github.com/babylonchain/babylon-da-sdk/issues/41 to use it.

gitferry commented 4 months ago

We didn't know this BTC client before, created an issue https://github.com/babylonchain/babylon-da-sdk/issues/41 to use it.

Cool. I think a lot of code can be copied from the indexer repo I shared. Let's address it in this PR

parketh commented 4 months ago

Now updated to use the BTC client linked by @gitferry above