Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The dcr beta node is only able to add 1 block to the mainchain after disconnecting from the alpha node, because the beta node has no way to receive votes while disconnected from alpha. This prevents reorgs on either nodes since the reorg script ends with both nodes reconnected but having just 1 divergent mainchain block each. This is fixed by mining an "extra" block on either node (after reconnection) to trigger a reorg on the other node. Additionally, the dcr reorg script is modified to accept 2 optional arguments: `./reorg (node depth), where - `node` is the node that should experience a reorg, either "alpha" or "beta" - `depth` is the number of blocks that should be purged from `node`. Currently, due to the beta mining limitation mentioned above, only 1 block can be purged from either nodes during reorg, but the reorged node will always see `depth` new blocks after the reorg.
- Loading branch information
1 parent
0490291
commit c34f5f7
Showing
2 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters