Disable payment protocol pending further assessment and potential rework.

This commit is contained in:
Ross Nicoll 2014-04-27 19:51:21 +01:00
parent 7f16738720
commit 5967654730
No known key found for this signature in database
GPG key ID: 9142E5F7E533CE3B

View file

@ -170,7 +170,7 @@ public:
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
/// Create payment server /// Create payment server
void createPaymentServer(); // void createPaymentServer();
#endif #endif
/// Create options model /// Create options model
void createOptionsModel(); void createOptionsModel();
@ -206,7 +206,7 @@ private:
BitcoinGUI *window; BitcoinGUI *window;
QTimer *pollShutdownTimer; QTimer *pollShutdownTimer;
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
PaymentServer* paymentServer; // PaymentServer* paymentServer;
WalletModel *walletModel; WalletModel *walletModel;
#endif #endif
int returnValue; int returnValue;
@ -273,7 +273,7 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
window(0), window(0),
pollShutdownTimer(0), pollShutdownTimer(0),
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
paymentServer(0), // paymentServer(0),
walletModel(0), walletModel(0),
#endif #endif
returnValue(0) returnValue(0)
@ -292,18 +292,20 @@ BitcoinApplication::~BitcoinApplication()
delete window; delete window;
window = 0; window = 0;
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
delete paymentServer; // delete paymentServer;
paymentServer = 0; // paymentServer = 0;
#endif #endif
delete optionsModel; delete optionsModel;
optionsModel = 0; optionsModel = 0;
} }
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
/*
void BitcoinApplication::createPaymentServer() void BitcoinApplication::createPaymentServer()
{ {
paymentServer = new PaymentServer(this); paymentServer = new PaymentServer(this);
} }
*/
#endif #endif
void BitcoinApplication::createOptionsModel() void BitcoinApplication::createOptionsModel()
@ -386,10 +388,12 @@ void BitcoinApplication::initializeResult(int retval)
returnValue = retval ? 0 : 1; returnValue = retval ? 0 : 1;
if(retval) if(retval)
{ {
/*
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
PaymentServer::LoadRootCAs(); PaymentServer::LoadRootCAs();
paymentServer->setOptionsModel(optionsModel); paymentServer->setOptionsModel(optionsModel);
#endif #endif
*/
emit splashFinished(window); emit splashFinished(window);
@ -404,8 +408,10 @@ void BitcoinApplication::initializeResult(int retval)
window->addWallet("~Default", walletModel); window->addWallet("~Default", walletModel);
window->setCurrentWallet("~Default"); window->setCurrentWallet("~Default");
/*
connect(walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)), connect(walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)),
paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray))); paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray)));
*/
} }
#endif #endif
@ -419,15 +425,19 @@ void BitcoinApplication::initializeResult(int retval)
window->show(); window->show();
} }
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
// Payment server disabled pending future work on specifications
// Now that initialization/startup is done, process any command-line // Now that initialization/startup is done, process any command-line
// dogecoin: URIs or payment requests: // dogecoin: URIs or payment requests:
connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)), /*
connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
window, SLOT(handlePaymentRequest(SendCoinsRecipient))); window, SLOT(handlePaymentRequest(SendCoinsRecipient)));
connect(window, SIGNAL(receivedURI(QString)), connect(window, SIGNAL(receivedURI(QString)),
paymentServer, SLOT(handleURIOrFile(QString))); paymentServer, SLOT(handleURIOrFile(QString)));
connect(paymentServer, SIGNAL(message(QString,QString,unsigned int)), connect(paymentServer, SIGNAL(message(QString,QString,unsigned int)),
window, SLOT(message(QString,QString,unsigned int))); window, SLOT(message(QString,QString,unsigned int)));
QTimer::singleShot(100, paymentServer, SLOT(uiReady())); QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
*/
#endif #endif
} else { } else {
quit(); // Exit main loop quit(); // Exit main loop
@ -548,7 +558,7 @@ int main(int argc, char *argv[])
// Start up the payment server early, too, so impatient users that click on // Start up the payment server early, too, so impatient users that click on
// dogecoin: links repeatedly have their payment requests routed to this process: // dogecoin: links repeatedly have their payment requests routed to this process:
app.createPaymentServer(); // app.createPaymentServer();
#endif #endif
/// 9. Main GUI initialization /// 9. Main GUI initialization