message: [Core] Update money supply when disconnecting blocks too
diff: @@ -2045,6 +2045,8 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
  bool fClean = true;
  CBlockUndo blockUndo;
  + CAmount nValueOut = 0;
  + CAmount nValueIn = 0;
  CDiskBlockPos pos = pindex->GetUndoPos();
  if (pos.IsNull())
  return error("DisconnectBlock() : no undo data available");
  @@ -2081,9 +2083,11 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
  return error("Failed to parse public spend");
  }
  serial = publicSpend.getCoinSerialNumber();
  + nValueIn += publicSpend.getDenomination() * COIN;
  } else {
  libzerocoin::CoinSpend spend = TxInToZerocoinSpend(txin);
  serial = spend.getCoinSerialNumber();
  + nValueIn += spend.getDenomination() * COIN;
  }
  if (!zerocoinDB->EraseCoinSpend(serial))
  @@ -2116,9 +2120,11 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
  }
  }
  }
  + nValueOut += tx.GetValueOut();
  uint256 hash = tx.GetHash();
  +
  // Check that all outputs are available and match the outputs in the block itself
  // exactly. Note that transactions with only provably unspendable outputs won't
  // have outputs available even in the block itself, so we handle that case
  @@ -2169,8 +2175,14 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
  coins->vout[out.n] = undo.txout;
  }
  }
  +
  + if (!tx.HasZerocoinSpendInputs() && !tx.IsCoinBase() && view.HaveInputs(tx))
  + nValueIn += view.GetValueIn(tx);
  }
  + // track money
  + nMoneySupply -= (nValueOut - nValueIn);
  +
  // move best block pointer to prevout block
  view.SetBestBlock(pindex->pprev->GetBlockHash());
  