Before client side reorg support can be implemented we need to make sure that the wallet server is properly handling them and sending correct header information to the client.
One way to reproduce forking is:
start two lbrycrd instances in regtest mode on different ports
have them connect
generate 200 blocks (on any of them, since they will sync)
disconnect them
generate 2 blocks on one and 3 blocks on the other
have wallet server sync with the two block lbrycrd
reconnect lbrycrds (trigger reorg)
check that the 2 blocks lbrycrd accepts the longer chain from the 3 blocks lbrycrd
check that wallet server reorgs correctly and sends correct header and block info to client
Before client side reorg support can be implemented we need to make sure that the wallet server is properly handling them and sending correct header information to the client.
One way to reproduce forking is:
Further reading: