complete redemption of signed transactions from octree server

This commit is contained in:
Stephen Birarda 2014-07-31 11:03:12 -07:00
parent 453c37f4b9
commit e1ba076a71
3 changed files with 8 additions and 4 deletions

View file

@ -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() {

View file

@ -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;

View file

@ -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();
}
}
}