< phantomcircuit>
sipa, i should note that the recv/send select logic is basically incompatible with callback style handling
< sipa>
phantomcircuit: how so?
< phantomcircuit>
sipa, selectively not asking about recv when we have write buffer to send is awkward with callbacks
< sipa>
phantomcircuit: you can use a model where if a recv available callback happens for a peer for which we have a send buffer, you just set a boolean; and whenever you empty the send buffer, you check that boolean and then run the normal recv is true
< phantomcircuit>
sipa, but if the send buffers doesn't empty you have a spin loop
< sipa>
phantomcircuit: hmm, i have no experience with async io models, but i'd expect you get only notified once when recv buffer goes from not empty to empty; or at least at most once per tcp packet or so
< sipa>
*from empty to non-empty
< bitcoin-git>
[bitcoin] MarcoFalke closed pull request #14309: Use non-throwing type-safe ChainType where possible (master...Mf1809-chainType) https://github.com/bitcoin/bitcoin/pull/14309
< phantomcircuit>
sipa, you register for events which can either be edge or level triggered
< phantomcircuit>
the edge triggered would avoid the issue but is more prone to missing events cause of buts
< phantomcircuit>
bugs
< sipa>
phantomcircuit: makes sense
< echeveria>
why does the inwitness rpc field deseralize by default?
< sanket1729>
Hello, I have one small quick question. Does bitcoin core ever prune orphan blocks? I mean do all full nodes have a very old orphan block, say from 2014?
< wumpus>
sanket1729: they do!
< wumpus>
sanket1729: eh, they don't I mean, they do *keep*those blocks
< wumpus>
sanket1729: 'getchaintips' to get the alternative chain tips IIRC
< sanket1729>
Thanks! Do the nodes respond to getBlock p2p command for such old block?
< wumpus>
no, they only respond for blocks on the current chain; otherwise that would be way to fingerprint nodes
< sanket1729>
Thanks, so there is no way I can get the block via the p2p interface, right?
< echeveria>
that's literally what was said in the conversation.
< wumpus>
right, only through RPC "getblock"
< wumpus>
if you're looking for a specific block, you could check block explorers if they have it, or ask here or in #bitcoin