From 6787d44bd050ad792e2c6c59a21472dc4539683d Mon Sep 17 00:00:00 2001 From: lateminer Date: Wed, 14 Nov 2018 20:55:45 +0300 Subject: [PATCH] Make it compile --- src/qt/rpcconsole.cpp | 5 ++++- src/qt/splashscreen.cpp | 6 +++--- src/random.h | 20 ++++++-------------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 7e48e0a32..575c3b567 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -903,7 +903,10 @@ void RPCConsole::banSelectedNode(int bantime) int port = 0; SplitHostPort(nStr, port, addr); - CNode::Ban(CNetAddr(addr), BanReasonManuallyAdded, bantime); + CNetAddr resolved; + if(!LookupHost(addr.c_str(), resolved, false)) + return; + CNode::Ban(resolved, BanReasonManuallyAdded, bantime); clearSelectedNode(); clientModel->getBanTableModel()->refresh(); diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index b9d391ab5..3ccdbf357 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -30,7 +30,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) QWidget(0, f), curAlignment(0) { // set reference point, paddings - int paddingRight = 50; + int paddingRight = 15; int paddingTop = 50; int titleVersionVSpace = 17; int titleCopyrightVSpace = 40; @@ -111,8 +111,8 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) const int x = pixmap.width()/devicePixelRatio-titleTextWidth-paddingRight; const int y = paddingTop+titleCopyrightVSpace; pixPaint.drawText(x,y,copyrightTextBitcoin); - pixPaint.drawText(x,y+15,copyrightTextBlackcoin); - pixPaint.drawText(x,y+30,copyrightTextBlackmore); + pixPaint.drawText(x,y+10,copyrightTextBlackcoin); + pixPaint.drawText(x,y+20,copyrightTextBlackmore); } // draw additional text if special network diff --git a/src/random.h b/src/random.h index 8bba4cfbd..476ab5c29 100644 --- a/src/random.h +++ b/src/random.h @@ -94,20 +94,12 @@ public: } }; -/* Number of random bytes returned by GetOSRand. - * When changing this constant make sure to change all call sites, and make - * sure that the underlying OS APIs for all platforms support the number. - * (many cap out at 256 bytes). - */ -static const ssize_t NUM_OS_RANDOM_BYTES = 32; - -/** Get 32 bytes of system entropy. Do not use this in application code: use - * GetStrongRandBytes instead. - */ -void GetOSRand(unsigned char *ent32); - -/** Check that OS randomness is available and returning the requested number - * of bytes. +/** + * MWC RNG of George Marsaglia + * This is intended to be fast. It has a period of 2^59.3, though the + * least significant 16 bits only have a period of about 2^30.1. + * + * @return random value */ extern uint32_t insecure_rand_Rz; extern uint32_t insecure_rand_Rw;