mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 21:42:24 +02:00
complete redemption of signed transactions from octree server
This commit is contained in:
parent
453c37f4b9
commit
e1ba076a71
3 changed files with 8 additions and 4 deletions
|
@ -1253,7 +1253,9 @@ void OctreeServer::handleSignedTransactionPayment(PacketType packetType, const Q
|
|||
}
|
||||
|
||||
void OctreeServer::handleSignedTransactionPaymentResponse(const QJsonObject& jsonObject) {
|
||||
qDebug() << "STP response:" << jsonObject;
|
||||
// pull the ID to debug the transaction
|
||||
QString transactionIDString = jsonObject["data"].toObject()["transaction"].toObject()["id"].toString();
|
||||
qDebug() << "Redeemed transaction with ID" << transactionIDString << "successfully.";
|
||||
}
|
||||
|
||||
void OctreeServer::sendStatsPacket() {
|
||||
|
|
|
@ -127,6 +127,8 @@ public slots:
|
|||
void nodeAdded(SharedNodePointer node);
|
||||
void nodeKilled(SharedNodePointer node);
|
||||
void sendStatsPacket();
|
||||
|
||||
void handleSignedTransactionPaymentResponse(const QJsonObject& jsonObject);
|
||||
|
||||
protected:
|
||||
void parsePayload();
|
||||
|
@ -138,7 +140,6 @@ protected:
|
|||
QString getStatusLink();
|
||||
|
||||
void handleSignedTransactionPayment(PacketType packetType, const QByteArray& datagram);
|
||||
void handleSignedTransactionPaymentResponse(const QJsonObject& jsonObject);
|
||||
|
||||
int _argc;
|
||||
const char** _argv;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "AccountManager.h"
|
||||
|
||||
const bool VERBOSE_HTTP_REQUEST_DEBUGGING = true;
|
||||
const bool VERBOSE_HTTP_REQUEST_DEBUGGING = false;
|
||||
|
||||
AccountManager& AccountManager::getInstance() {
|
||||
static AccountManager sharedInstance;
|
||||
|
@ -198,7 +198,7 @@ void AccountManager::invokedRequest(const QString& path,
|
|||
networkRequest.setUrl(requestURL);
|
||||
|
||||
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
||||
qDebug() << "Making an authenticated request to" << qPrintable(requestURL.toString());
|
||||
qDebug() << "Making a request to" << qPrintable(requestURL.toString());
|
||||
|
||||
if (!dataByteArray.isEmpty()) {
|
||||
qDebug() << "The POST/PUT body -" << QString(dataByteArray);
|
||||
|
@ -301,6 +301,7 @@ void AccountManager::passErrorToCallback(QNetworkReply* requestReply) {
|
|||
if (VERBOSE_HTTP_REQUEST_DEBUGGING) {
|
||||
qDebug() << "Received error response from data-server that has no matching callback.";
|
||||
qDebug() << "Error" << requestReply->error() << "-" << requestReply->errorString();
|
||||
qDebug() << requestReply->readAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue