message: Extend error messages for AAL errors
diff: @@ -2759,8 +2759,58 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
  //If this error happens, it probably means that something with AAL created transactions didn't match up to what is expected
  if((checkBlock.GetHash() != block.GetHash()) && !fJustCheck)
  + {
  + LogPrintf("Actual block data does not match block expected by AAL\n");
  + //Something went wrong with AAL, compare different elements and determine what the problem is
  + if(checkBlock.hashMerkleRoot != block.hashMerkleRoot){
  + //there is a mismatched tx, so go through and determine which txs
  + if(block.vtx.size() > checkBlock.vtx.size()){
  + LogPrintf("Unexpected AAL transactions in block. Actual txs: %i, expected txs: %i\n", block.vtx.size(), checkBlock.vtx.size());
  + for(size_t i=0;i<block.vtx.size();i++){
  + if(i > checkBlock.vtx.size()){
  + LogPrintf("Unexpected transaction: %s\n", block.vtx[i]->ToString());
  + }else {
  + if (block.vtx[i]->GetHash() != block.vtx[i]->GetHash()) {
  + LogPrintf("Mismatched transaction at entry %i\n", i);
  + LogPrintf("Actual: %s\n", block.vtx[i]->ToString());
  + LogPrintf("Expected: %s\n", checkBlock.vtx[i]->ToString());
  + }
  + }
  + }
  + }else if(block.vtx.size() < checkBlock.vtx.size()){
  + LogPrintf("Actual block is missing AAL transactions. Actual txs: %i, expected txs: %i\n", block.vtx.size(), checkBlock.vtx.size());
  + for(size_t i=0;i<checkBlock.vtx.size();i++){
  + if(i > block.vtx.size()){
  + LogPrintf("Missing transaction: %s\n", checkBlock.vtx[i]->ToString());
  + }else {
  + if (block.vtx[i]->GetHash() != block.vtx[i]->GetHash()) {
  + LogPrintf("Mismatched transaction at entry %i\n", i);
  + LogPrintf("Actual: %s\n", block.vtx[i]->ToString());
  + LogPrintf("Expected: %s\n", checkBlock.vtx[i]->ToString());
  + }
  + }
  + }
  + }else{
  + //count is correct, but a tx is wrong
  + for(size_t i=0;i<checkBlock.vtx.size();i++){
  + if (block.vtx[i]->GetHash() != block.vtx[i]->GetHash()) {
  + LogPrintf("Mismatched transaction at entry %i\n", i);
  + LogPrintf("Actual: %s\n", block.vtx[i]->ToString());
  + LogPrintf("Expected: %s\n", checkBlock.vtx[i]->ToString());
  + }
  + }
  + }
  + }
  + if(checkBlock.hashUTXORoot != block.hashUTXORoot){
  + LogPrintf("Actual block data does not match hashUTXORoot expected by AAL block\n");
  + }
  + if(checkBlock.hashStateRoot != block.hashStateRoot){
  + LogPrintf("Actual block data does not match hashStateRoot expected by AAL block\n");
  + }
  +
  return state.DoS(100, error("ConnectBlock(): Incorrect AAL transactions or hashes (hashStateRoot, hashUTXORoot)"),
  REJECT_INVALID, "incorrect-transactions-or-hashes-block");
  + }
  if (fJustCheck)
  {
  