-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Bitcoind replace lnd-onchain #438
Conversation
}) // TODO conf_target | ||
const feerate = result.feerate | ||
// 1 BTC/kB = 100000 satoshis/byte | ||
fee = 100000 * feerate // TODO not sure about this: is fee by size, not a total fee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed that it is different from lightning's getChainFeeEstimate, which does return a total fee.
This is still in full WIP mode, so it contains multiple open questions as comments (which will be cleaned up after addressed). The main blocker at the moment is related to the lifecycle of the zeromq socket. I haven't found a way to be able to run multiple tests with it, at the moment it only works in a single test at a time... |
throw new LoggedError(error) | ||
} | ||
// TODO pubkey should be known already | ||
const { pubkey } = await this.bitcoindWalletClient.getAddressInfo({ address }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need this pubkey, the previous pubkey is the pubkey of lnd node that is needed to get chain data in the cron and trigger.
bitcoindSubscribers module includes logging messages test functions receiveRawBlockSubscriber and receiveRawTxSubscriber
TODO: not using SpecterWalletConstructorArgs as I am not sure the best way to add BitcoindClient type
- getBalancesDetail and getBalance bitcoind index utility functions receive BitcoindClient as parameter - replaced with OnChainMixin instance variable TODO?
- estimateSmartFee added to BitcoindClient - listTransactions added to BitcoindWalletClient - getTransaction moved to BitcoindWalletClient - getNewAddress now accepts optional address_type param - sendToAddress now accepts optional fee_rate param
- OnChainMixin methods now use bitcoind client calls instead of lnd -- getSatsAndAddressPerTx method broken up -- some TODO comments should be confirmed, is a WIP - getOnChainTransactions function no longer required - some types and comments fixed
Is the equivalent to lnd-onchain's onchainTransactionEventHandler
At the moment is only working for a single instance, which is not compatible with the current test's idempotence requirement
- "create hot wallet" test added - TODO "funds lnd1 node" updated (confirm use of bankowner)
Should be done with a mock ideally
These wallet actions add complexity to the integration tests, so will be addressed later
This reverts commit 22cbf98.
without the removal of tests
which is commented out for tests to pass if this is the only bitcoind zmq/subscriber instance...
82618e1
to
cdabe8d
Compare
only one test at a time works
@jotapea you should have the PR as "draft" when they are work in progress |
New branch, but still a work in progress, for the original #317.