src/main/Node.java
public void switchBlockchain(Blockchain newChain){
        if(newChain.validateChain() && newChain.blockChain.size() > currentBlockchain.blockChain.size()){
            currentBlockchain = newChain;
        }
    }
// When new blockchain is longer than current, and valid, switch to new blockchain
When new blockchain is longer than current, and valid, switch to new blockchain
When new blockchain is longer than current and valid switch to new blockchain
public void switchBlockchain(Blockchain newChain){
        if(newChain.validateChain() && newChain.blockChain.size() > currentBlockchain.blockChain.size()){
            currentBlockchain = newChain;
        }
    }
public void switchBlockchain ( Blockchain newChain ) { if ( newChain . validateChain ( ) && newChain . blockChain . size ( ) > currentBlockchain . blockChain . size ( ) ) { currentBlockchain = newChain ; } }
When new blockchain is longer than current, and valid, switch to new blockchain
When new blockchain is longer than current and valid switch to new blockchain