--- Log opened Sat Jan 13 00:00:28 2024 08:55 -!- trev [~trev@user/trev] has joined #bitcoin-rust 08:56 -!- trev [~trev@user/trev] has left #bitcoin-rust [] 09:53 -!- pablomartin4btc [~pablomart@89.40.212.242] has joined #bitcoin-rust 10:17 -!- pablomartin4btc [~pablomart@89.40.212.242] has quit [Ping timeout: 260 seconds] 10:18 -!- pablomartin4btc [~pablomart@89.40.212.236] has joined #bitcoin-rust 10:56 -!- rob [~rob@2603-800c-25f0-0e20-2d10-612d-1a33-f755.res6.spectrum.com] has joined #bitcoin-rust 10:56 -!- rob is now known as Guest7360 10:57 -!- Guest7360 [~rob@2603-800c-25f0-0e20-2d10-612d-1a33-f755.res6.spectrum.com] has quit [Client Quit] 11:15 < Ademan_> yancy: I think that makes sense, Amount does checked arithmetic which is going to always be more expensive. I haven't run the benchmark to see just how bad it is though 14:58 -!- pablomartin4btc [~pablomart@89.40.212.236] has quit [Ping timeout: 260 seconds] 15:00 -!- pablomartin4btc [~pablomart@89.40.212.242] has joined #bitcoin-rust 15:03 < yancy> Ademan_: hmm interesting. What's even the point of checked_add() then instead of add? The add trait shouldn't do a checked_add imo. 15:07 -!- pablomartin4btc [~pablomart@89.40.212.242] has quit [Ping timeout: 245 seconds] 22:17 < Ademan_> well it's to prevent footguns around under/overflow afaict, which is A Good Thing (TM) imho. I don't know rust well enough to know if it's a violation of any design principles to do a checked add then panic in case of overflow 22:18 < Ademan_> arguably the right thing might be to just not implement the standard arithmetic operators and force users to use checked arithmetic and handle errors accordingly, I'm sure the library authors thought that was too cumbersome for users though 22:19 < Ademan_> a panic is probably better than money gone lol, but it does still create a denial of service vector 22:19 < Ademan_> is better than money gone* --- Log closed Sun Jan 14 00:00:29 2024