2023 Feb 08
Pretty cool,
Iter<Option<_>>::map
will map to anotherOption
, so you don’t have to handle unwrapping in order to convert the inner type.Updated my followup PR.
Probably going to do some review and cryptopals today.
Considering switching to NeoVim…Vim is just more universal and I imagine everything I do in helix can be done in NeoVim. Then again, it is really nice how small the config is, and it’s not like I’m working on remote servers all that often…
Feeling like I’m getting a better foundation for how to write good PRs/just be a better open-source contributor/software developer. Getting better at manipulating commits, understanding better when it makes sense to separate commits and whether to squash fixups and how to lookover my changes before pushing.
Realized
payment_secret
doesn’t really need to tie together MPP HTLCs because they also all use the samepayment_hash
.Reviewing
Why is it necessary to move payment retrying for trampoline?
- Saw in preceding PRs that moving payment retrying into ChannelManager is to be able to support trampoline payments. Is this to support retrying payments when a node built with LDK is acting as a trampoline node (did automated retrying not exist in LDK before)?
Dang so, you don’t need a mutable reference to an object if its behind a mutex (outbound_payment::abandon_payment, check_retry_payments, etc.)
So apparently there’s “interior mutability” which basically breaks the core laws of Rust wtf!! Sometimes you want to have a shared reference that’s mutable by multiple parties (Mutex, doesn’t differentiate between readers and writers), and sometimes you do want to have a shared reference where different parties are reading or writing (RwLock, one writer many readers), along with other instances where you need to employ mutability where Rust typically wouldn’t let you.
What is the reason for changing
abandon_payment
andcheck_retry_payments
to take inpending_events
as opposed to how it was before. Is it mainly just because it’s a bit cleaner or is there other significance?
I love Bitcoin Optech: great summary on trampoline.
- Question: to conceal whether a trampoline node is sending to the final destination, the recipient must also be a trampoline node right (which definitely wouldn’t always be the case)? Because in order for it to be ambiguous, a trampoline would have to not be able to tell if it was sending to another trampoline or not, but whether nodes support trampoline is public or easily discovered right?