Thank you for explaining.
In regard of consistency, say that I get a reorg callback. My reorg callback will simply send a message over to my program’s main logics thread, so it’ll do a new round of blockchain queries:
function gotReorgCallback(newHEAD) { sendMessage(mainLogicsThread,{ gotANewBlock: newHEAD }); node.listenForReorgs(gotReorgCallback); }
node.chain().listenForReorgs(gotReorgCallback);
Now here applies, that because LibBitcoin is fully asynchronous, more reorgs can happen.
this means that the main UI thread, as it goes into doing a ton of node.chain(). query operations, *another* reorg may happen between and during any of those query operations right
So this just means that my node.chain(). querying code needs to be prepared that a reorg could happen anytime.