How exactly blockchain node switches to another chain?
问题 AFAIK after block validation node runs all transactions in the block, changing the state (list of UTXOs) Let's imagine that at some point node realizes that it was on the wrong chain and there is longer chain available, which forked some blocks before. How does it make the switch? I imagine that it should run all transactions in reverse till the fork happened to restore the state and than replay all transactions in the blocks from the longer chain? Thanks! 回答1: Each node receives individual