--- Log opened Mon Sep 16 00:00:53 2024 01:46 -!- pablomartin [~pablomart@188.241.144.52] has joined #bitcoin-rust 03:11 -!- pablomartin [~pablomart@188.241.144.52] has quit [Remote host closed the connection] 03:13 -!- pablomartin [~pablomart@91.196.222.130] has joined #bitcoin-rust 03:41 < shesek> I'm trying to determine the total number of leaves in a TaprootSpendInfo, duplicates included. I initially thought that counting the number of merkle path proofs for all scripts would do it (i.e. `tapinfo.script_map().values().map(|branches| branches.len()).sum()`) 03:41 < shesek> however, that doesn't quite work. if a script is duplicated *as a direct sibling of itself*, the merkle proofs would be identical for both nodes so my approach would only count them as one. any suggestions for other ways to achieve this? 03:48 < shesek> would it make sense for ScriptMerkleProofMap to have a Vec of paths instead of a BTreeSet to account for that possibility? 05:19 -!- jon_atack [~jonatack@user/jonatack] has joined #bitcoin-rust 05:21 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 252 seconds] 05:27 < shesek> my counting method also wouldn't work if there are any hidden leaves in the tree. I guess that in such cases TaprootSpendInfo simply doesn't provide enough information to be able to tell 05:27 < shesek> well duh, they are hidden :) 06:36 -!- pablomartin [~pablomart@91.196.222.130] has quit [Ping timeout: 252 seconds] 06:55 -!- pablomartin [~pablomart@91.196.222.130] has joined #bitcoin-rust 06:56 -!- pablomartin [~pablomart@91.196.222.130] has quit [Client Quit] 08:20 -!- halloy6867 [~halloy686@97.115.235.2] has joined #bitcoin-rust 08:41 -!- halloy6867 [~halloy686@97.115.235.2] has quit [Remote host closed the connection] 08:42 -!- halloy6867 [~halloy686@97.115.235.2] has joined #bitcoin-rust 09:07 -!- halloy6867 [~halloy686@97.115.235.2] has quit [Ping timeout: 276 seconds] 11:35 -!- Guest38 [~Guest38@2601:58b:4201:680:dd4:4642:ae80:5e4] has joined #bitcoin-rust 11:36 -!- Guest38 [~Guest38@2601:58b:4201:680:dd4:4642:ae80:5e4] has quit [Client Quit] 12:47 -!- cmc [~methos@gateway/tor-sasl/cmc] has quit [Ping timeout: 260 seconds] 12:48 -!- cmc [~methos@gateway/tor-sasl/cmc] has joined #bitcoin-rust 14:52 < yancy> I hope I'm wrong, although I think there's suttle arithmetic bug in fee_rate.rs on method checked_mul_by_weight. Example: fee_rate = 864 sat/kwu, weight = 381 wu. The method returns 330 sats, although shouldn't it be 329 sats? 14:53 < yancy> 864 kwu * 0.381 = 329.184 14:56 < yancy> removing the checked_add 999 gives the correct result 14:57 -!- jirijakes [~jirijakes@118.150.148.23] has joined #bitcoin-rust 15:03 < yancy> I'll just open a gh issue to be sure I guess. 17:07 -!- pablomartin [~pablomart@91.196.222.130] has joined #bitcoin-rust 18:00 -!- pablomartin [~pablomart@91.196.222.130] has quit [Ping timeout: 260 seconds] --- Log closed Tue Sep 17 00:00:55 2024