message: Fixes for coin freeze input validation.
diff: #include "guiconstants.h"
  #include "guiutil.h"
  #include "optionsmodel.h"
  +#include "main.h"
  ReceiveFreezeDialog::ReceiveFreezeDialog(QWidget *parent) :
  QDialog(parent),
  @@ -16,6 +17,12 @@ ReceiveFreezeDialog::ReceiveFreezeDialog(QWidget *parent) :
  {
  ui->setupUi(this);
  + ui->freezeDateTime->setMinimumDateTime(QDateTime::currentDateTime());
  + ui->freezeDateTime->setDisplayFormat("yyyy/MM/dd hh:mm");
  + ui->freezeDateTime->setDateTime(QDateTime::currentDateTime());
  +
  + ui->freezeBlock->setMinimum(chainActive.Height());
  +
  on_resetButton_clicked();
  connect(this, SIGNAL(accepted()), parent, SLOT(on_freezeDialog_hide()));
  @@ -35,14 +42,14 @@ void ReceiveFreezeDialog::setModel(OptionsModel *model)
  void ReceiveFreezeDialog::on_freezeDateTime_editingFinished()
  {
  - if (ui->freezeDateTime->dateTime() > QDateTime::fromMSecsSinceEpoch(0))
  + if (ui->freezeDateTime->dateTime() > ui->freezeDateTime->minimumDateTime())
  ui->freezeBlock->clear();
  }
  void ReceiveFreezeDialog::on_freezeBlock_editingFinished()
  {
  if (ui->freezeBlock->value() > 0)
  - ui->freezeDateTime->setDateTime(QDateTime::fromMSecsSinceEpoch(0));
  + ui->freezeDateTime->setDateTime(ui->freezeDateTime->minimumDateTime());
  /* limit check */
  std::string freezeText = ui->freezeBlock->text().toStdString();
  @@ -55,7 +62,7 @@ void ReceiveFreezeDialog::on_freezeBlock_editingFinished()
  void ReceiveFreezeDialog::on_resetButton_clicked()
  {
  ui->freezeBlock->clear();
  - ui->freezeDateTime->setDateTime(QDateTime::fromMSecsSinceEpoch(0));
  + ui->freezeDateTime->setDateTime(ui->freezeDateTime->minimumDateTime());
  }
  void ReceiveFreezeDialog::on_okButton_clicked()
  @@ -66,7 +73,6 @@ void ReceiveFreezeDialog::on_okButton_clicked()
  void ReceiveFreezeDialog::on_ReceiveFreezeDialog_rejected()
  {
  // this signal is also called by the ESC key
  -
  on_resetButton_clicked();
  }
  @@ -76,10 +82,15 @@ void ReceiveFreezeDialog::getFreezeLockTime(CScriptNum &nFreezeLockTime)
  // try freezeBlock
  std::string freezeText = ui->freezeBlock->text().toStdString();
  - if (freezeText != "") nFreezeLockTime = CScriptNum(std::strtoul(freezeText.c_str(),0,10));
  + if (freezeText != "")
  + nFreezeLockTime = CScriptNum(std::strtoul(freezeText.c_str(),0,10));
  + else
  + {
  // try freezeDateTime
  - if (nFreezeLockTime == 0) nFreezeLockTime = CScriptNum(ui->freezeDateTime->dateTime().toMSecsSinceEpoch() / 1000);
  + if (ui->freezeDateTime->dateTime() > ui->freezeDateTime->minimumDateTime())
  + nFreezeLockTime = CScriptNum(ui->freezeDateTime->dateTime().toMSecsSinceEpoch() / 1000);
  + }
  }
  