chrisguida / smaug

`smaug` watches your bitcoin treasury with a meticulous eye
MIT License
13 stars 3 forks source link

fail gracefully if user doesn't have bitcoind with scanblocks enabled #30

Open chrisguida opened 9 months ago

chrisguida commented 9 months ago

they need bitcoind >=v24 (i think) and blockfilterindex=1 enabled

They also need the index to be finished building

fallback to esplora?

need to fix esplora in that case https://github.com/bitcoindevkit/bdk/issues/1120#issuecomment-1834676960

ca-ruz commented 5 hours ago

Hey, I tried this and got error:

$ cl smaug add "wpkh([56003681/84h/0h/0h]tpubDDrecdRDGxYiu2eduJiPyojMQQJcCnQpyLpA18BkEFtr8S9jgAGAhZ5TKgpArzcnu8qYcVtad2KGXhWsxRgjJbLLwMDH3SW4YcaHbScwLs1/0/*)#840qygs5" "wpkh([56003681/84h/0h/0h]tpubDDrecdRDGxYiu2eduJiPyojMQQJcCnQpyLpA18BkEFtr8S9jgAGAhZ5TKgpArzcnu8qYcVtad2KGXhWsxRgjJbLLwMDH3SW4YcaHbScwLs1/1/*)#kp2peaqv"
"JSON-RPC error: RPC error response: RpcError { code: -1, message: \"Index is not enabled for filtertype basic\", data: None }"
ca-ruz commented 5 hours ago

If the block filter index is currently syncing, the add command runs and waits for it to finish, we should an error if the block filter index is not done being built.