support incremental wallet updates

This commit is contained in:
Wladimir J. van der Laan
2011-06-03 20:48:03 +02:00
parent 48208883de
commit 9d9a4e874d
4 changed files with 108 additions and 22 deletions

View File

@@ -63,6 +63,17 @@ void ClientModel::update()
emit numTransactionsChanged(getNumTransactions());
}
void ClientModel::setAddress(const QString &defaultAddress)
{
uint160 hash160;
std::string strAddress = defaultAddress.toStdString();
if (!AddressToHash160(strAddress, hash160))
return;
if (!mapPubKeys.count(hash160))
return;
CWalletDB().WriteDefaultKey(mapPubKeys[hash160]);
}
ClientModel::StatusCode ClientModel::sendCoins(const QString &payTo, qint64 payAmount)
{
uint160 hash160 = 0;