|
|
@ -216,6 +216,11 @@ void ChatModel::addrequestZaddr(QString tx, QString requestZaddr) |
|
|
|
this->requestZaddrMap[tx] = requestZaddr; |
|
|
|
} |
|
|
|
|
|
|
|
void ChatModel::addconfirmations(QString tx, int confirmation) |
|
|
|
{ |
|
|
|
this->confirmationsMap[tx] = confirmation; |
|
|
|
} |
|
|
|
|
|
|
|
QString ChatModel::getCidByTx(QString tx) |
|
|
|
{ |
|
|
|
for(auto& pair : this->cidMap) |
|
|
@ -231,6 +236,21 @@ QString ChatModel::getCidByTx(QString tx) |
|
|
|
return QString("0xdeadbeef"); |
|
|
|
} |
|
|
|
|
|
|
|
QString ChatModel::getConfirmationByTx(QString tx) |
|
|
|
{ |
|
|
|
for(auto& pair : this->confirmationsMap) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(this->confirmationsMap.count(tx) > 0) |
|
|
|
{ |
|
|
|
return this->confirmationsMap[tx]; |
|
|
|
} |
|
|
|
|
|
|
|
return QString("0xdeadbeef"); |
|
|
|
} |
|
|
|
|
|
|
|
QString ChatModel::getrequestZaddrByTx(QString tx) |
|
|
|
{ |
|
|
|
for(auto& pair : this->requestZaddrMap) |
|
|
@ -256,6 +276,11 @@ void ChatModel::killrequestZaddrCache() |
|
|
|
this->requestZaddrMap.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
void ChatModel::killConfirmationCache() |
|
|
|
{ |
|
|
|
this->confirmationsMap.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
QString MainWindow::createHeaderMemo(QString type, QString cid, QString zaddr, int version=0, int headerNumber=1) |
|
|
|
{ |
|
|
|
|
|
|
|