Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/paymentservertests.cpp
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | void PaymentServerTests::paymentServerTests() { | ||||
byteArray = QByteArray((const char *)data.data(), data.size()); | byteArray = QByteArray((const char *)data.data(), data.size()); | ||||
r.paymentRequest.parse(byteArray); | r.paymentRequest.parse(byteArray); | ||||
// Ensure the request is initialized | // Ensure the request is initialized | ||||
QVERIFY(r.paymentRequest.IsInitialized()); | QVERIFY(r.paymentRequest.IsInitialized()); | ||||
// Extract address and amount from the request | // Extract address and amount from the request | ||||
QList<std::pair<CScript, Amount>> sendingTos = r.paymentRequest.getPayTo(); | QList<std::pair<CScript, Amount>> sendingTos = r.paymentRequest.getPayTo(); | ||||
for (const std::pair<CScript, Amount> &sendingTo : sendingTos) { | for (const std::pair<CScript, Amount> &sendingTo : sendingTos) { | ||||
CTxDestination dest; | CTxDestination dest; | ||||
if (ExtractDestination(sendingTo.first, dest)) | if (ExtractDestination(sendingTo.first, dest)) { | ||||
QCOMPARE(PaymentServer::verifyAmount(sendingTo.second), false); | QCOMPARE(PaymentServer::verifyAmount(sendingTo.second), false); | ||||
} | } | ||||
} | |||||
delete server; | delete server; | ||||
} | } | ||||
void RecipientCatcher::getRecipient(const SendCoinsRecipient &r) { | void RecipientCatcher::getRecipient(const SendCoinsRecipient &r) { | ||||
recipient = r; | recipient = r; | ||||
} | } |