diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-07-06 00:54:24 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-07-06 00:54:24 +0000 |
commit | e65f25d54e10a600c7f870955dfbffa3b0e4134f (patch) | |
tree | 6af343074280bddc452985b64a7f6d6ecfbf7a3f | |
parent | 33a656c4ae26ec912795a7a1f582741fa710f976 (diff) | |
parent | 7083cc308328a1d30aabdecee6439e47f1567b84 (diff) | |
download | bitcoin-e65f25d54e10a600c7f870955dfbffa3b0e4134f.tar.xz |
Merge branch '0.6.0.x' into 0.6.x
Conflicts:
contrib/debian/patches/1001_use_system_json-spirit.patch
src/key.h
src/main.cpp
src/main.h
src/net.cpp
-rw-r--r-- | INSTALL | 4 | ||||
-rw-r--r-- | bitcoin-qt.pro | 8 | ||||
-rw-r--r-- | contrib/gitian-downloader/luke-jr-key.pgp | bin | 5467 -> 7322 bytes | |||
-rw-r--r-- | contrib/gitian-downloader/sipa-key.pgp | bin | 108922 -> 109468 bytes | |||
-rw-r--r-- | doc/build-msw.txt | 2 | ||||
-rw-r--r-- | doc/build-osx.txt | 2 | ||||
-rw-r--r-- | doc/build-unix.txt | 4 | ||||
-rw-r--r-- | doc/unit-tests.txt | 33 | ||||
-rw-r--r-- | src/addrman.h | 4 | ||||
-rw-r--r-- | src/base58.h | 8 | ||||
-rw-r--r-- | src/bignum.h | 16 | ||||
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/qt/optionsdialog.cpp | 2 | ||||
-rw-r--r-- | src/qt/optionsmodel.h | 2 | ||||
-rw-r--r-- | src/qt/overviewpage.cpp | 24 | ||||
-rw-r--r-- | src/qt/overviewpage.h | 2 | ||||
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 14 | ||||
-rw-r--r-- | src/qt/sendcoinsdialog.h | 2 | ||||
-rw-r--r-- | src/qt/sendcoinsentry.cpp | 18 | ||||
-rw-r--r-- | src/qt/sendcoinsentry.h | 1 | ||||
-rw-r--r-- | src/qt/test/uritests.cpp | 2 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 7 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.h | 2 | ||||
-rw-r--r-- | src/test/mruset_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/multisig_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/rpc_tests.cpp | 6 | ||||
-rw-r--r-- | src/util.cpp | 4 | ||||
-rw-r--r-- | src/util.h | 2 | ||||
-rw-r--r-- | src/wallet.h | 2 |
29 files changed, 126 insertions, 51 deletions
@@ -1,9 +1,9 @@ Building Bitcoin -See doc/readme-qt.rst for instructions on building Bitcoin QT, +See doc/readme-qt.rst for instructions on building Bitcoin-Qt, the intended-for-end-users, nice-graphical-interface, reference implementation of Bitcoin. See doc/build-*.txt for instructions on building bitcoind, the intended-for-services, no-graphical-interface, reference -implementation of Bitcoin. +implementation of Bitcoin.
\ No newline at end of file diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index 7f2a5a46be..3e2fe009ac 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -5,15 +5,15 @@ INCLUDEPATH += src src/json src/qt DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE CONFIG += no_include_pwd -# for boost 1.37, add -mt to the boost libraries +# for boost 1.37, add -mt to the boost libraries # use: qmake BOOST_LIB_SUFFIX=-mt # for boost thread win32 with _win32 sufix # use: BOOST_THREAD_LIB_SUFFIX=_win32-... # or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 -# Dependency library locations can be customized with BOOST_INCLUDE_PATH, -# BOOST_LIB_PATH, BDB_INCLUDE_PATH, BDB_LIB_PATH -# OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively +# Dependency library locations can be customized with: +# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH, +# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively OBJECTS_DIR = build MOC_DIR = build diff --git a/contrib/gitian-downloader/luke-jr-key.pgp b/contrib/gitian-downloader/luke-jr-key.pgp Binary files differindex c40917d78c..275b041d20 100644 --- a/contrib/gitian-downloader/luke-jr-key.pgp +++ b/contrib/gitian-downloader/luke-jr-key.pgp diff --git a/contrib/gitian-downloader/sipa-key.pgp b/contrib/gitian-downloader/sipa-key.pgp Binary files differindex a52a5deb1b..ffa09bb4ad 100644 --- a/contrib/gitian-downloader/sipa-key.pgp +++ b/contrib/gitian-downloader/sipa-key.pgp diff --git a/doc/build-msw.txt b/doc/build-msw.txt index b1805154e1..d4ae51d3f1 100644 --- a/doc/build-msw.txt +++ b/doc/build-msw.txt @@ -7,7 +7,7 @@ cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard. -See readme-qt.rst for instructions on building Bitcoin QT, the +See readme-qt.rst for instructions on building Bitcoin-Qt, the graphical user interface. WINDOWS BUILD NOTES diff --git a/doc/build-osx.txt b/doc/build-osx.txt index 2ae77067fc..4acd8d7653 100644 --- a/doc/build-osx.txt +++ b/doc/build-osx.txt @@ -12,7 +12,7 @@ Laszlo Hanyecz <solar@heliacal.net> Douglas Huff <dhuff@jrbobdobbs.org> -See readme-qt.rst for instructions on building Bitcoin QT, the +See readme-qt.rst for instructions on building Bitcoin-Qt, the graphical user interface. Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian. diff --git a/doc/build-unix.txt b/doc/build-unix.txt index f93ddcd969..e5ef12e446 100644 --- a/doc/build-unix.txt +++ b/doc/build-unix.txt @@ -16,8 +16,8 @@ To Build cd src/ make -f makefile.unix # Headless bitcoin -See readme-qt.rst for instructions on building Bitcoin QT, -the graphical bitcoin. +See readme-qt.rst for instructions on building Bitcoin-Qt, +the graphical user interface. Dependencies ------------ diff --git a/doc/unit-tests.txt b/doc/unit-tests.txt new file mode 100644 index 0000000000..e7f215188e --- /dev/null +++ b/doc/unit-tests.txt @@ -0,0 +1,33 @@ +Compiling/runing bitcoind unit tests +------------------------------------ + +bitcoind unit tests are in the src/test/ directory; they +use the Boost::Test unit-testing framework. + +To compile and run the tests: +cd src +make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix +./test_bitcoin # Runs the unit tests + +If all tests succeed the last line of output will be: +*** No errors detected + +To add more tests, add BOOST_AUTO_TEST_CASE's to the existing +.cpp files in the test/ directory or add new .cpp files that +implement new BOOST_AUTO_TEST_SUITE's (the makefiles are +set up to add test/*.cpp to test_bitcoin automatically). + + +Compiling/running Bitcoin-Qt unit tests +--------------------------------------- + +Bitcoin-Qt unit tests are in the src/qt/test/ directory; they +use the Qt unit-testing framework. + +To compile and run the tests: +qmake bitcoin-qt.pro BITCOIN_QT_TEST=1 +make +./bitcoin-qt_test + +To add more tests, add them to the src/qt/test/ directory, +the src/qt/test/test_main.cpp file, and bitcoin-qt.pro. diff --git a/src/addrman.h b/src/addrman.h index aa42025c07..cdca8569f8 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -22,13 +22,13 @@ private: // where knowledge about this address first came from CNetAddr source; - // last succesfull connection by us + // last successful connection by us int64 nLastSuccess; // last try whatsoever by us: // int64 CAddress::nLastTry - // connection attempts since last succesful attempt + // connection attempts since last successful attempt int nAttempts; // reference count in new sets (memory only) diff --git a/src/base58.h b/src/base58.h index bc681a08ca..dff475a746 100644 --- a/src/base58.h +++ b/src/base58.h @@ -70,7 +70,7 @@ inline std::string EncodeBase58(const std::vector<unsigned char>& vch) } // Decode a base58-encoded string psz into byte vector vchRet -// returns true if decoding is succesful +// returns true if decoding is successful inline bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet) { CAutoBN_CTX pctx; @@ -118,7 +118,7 @@ inline bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet) } // Decode a base58-encoded string str into byte vector vchRet -// returns true if decoding is succesful +// returns true if decoding is successful inline bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet) { return DecodeBase58(str.c_str(), vchRet); @@ -138,7 +138,7 @@ inline std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) } // Decode a base58-encoded string psz that includes a checksum, into byte vector vchRet -// returns true if decoding is succesful +// returns true if decoding is successful inline bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet) { if (!DecodeBase58(psz, vchRet)) @@ -159,7 +159,7 @@ inline bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRe } // Decode a base58-encoded string str that includes a checksum, into byte vector vchRet -// returns true if decoding is succesful +// returns true if decoding is successful inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet) { return DecodeBase58Check(str.c_str(), vchRet); diff --git a/src/bignum.h b/src/bignum.h index 307017b0ab..b737cdd569 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -122,16 +122,22 @@ public: return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n); } - void setint64(int64 n) + void setint64(int64 sn) { - unsigned char pch[sizeof(n) + 6]; + unsigned char pch[sizeof(sn) + 6]; unsigned char* p = pch + 4; - bool fNegative = false; - if (n < (int64)0) + bool fNegative; + uint64 n; + + if (sn < (int64)0) { - n = -n; + n = -sn; fNegative = true; + } else { + n = sn; + fNegative = false; } + bool fLeadingZeroes = true; for (int i = 0; i < 8; i++) { diff --git a/src/init.cpp b/src/init.cpp index 281a8cae56..31af0a390f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -407,7 +407,7 @@ bool AppInit2(int argc, char* argv[]) if (GetBoolArg("-upgradewallet", fFirstRun)) { int nMaxVersion = GetArg("-upgradewallet", 0); - if (nMaxVersion == 0) // the -walletupgrade without argument case + if (nMaxVersion == 0) // the -upgradewallet without argument case { printf("Performing wallet upgrade to %i\n", FEATURE_LATEST); nMaxVersion = CLIENT_VERSION; diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 0c43647b10..8a25a16e24 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -187,7 +187,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): layout->addWidget(map_port_upnp); connect_socks4 = new QCheckBox(tr("&Connect through SOCKS4 proxy:")); - connect_socks4->setToolTip(tr("Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)")); + connect_socks4->setToolTip(tr("Connect to the Bitcoin network through a SOCKS4 proxy (e.g. when connecting through Tor)")); layout->addWidget(connect_socks4); QHBoxLayout *proxy_hbox = new QHBoxLayout(); diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index da4e86f104..e5b3b31aa5 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -22,7 +22,7 @@ public: MinimizeOnClose, // bool ConnectSOCKS4, // bool ProxyIP, // QString - ProxyPort, // QString + ProxyPort, // int Fee, // qint64 DisplayUnit, // BitcoinUnits::Unit DisplayAddresses, // bool diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 5b5a8f5271..2c3d8a49e3 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -143,7 +143,7 @@ void OverviewPage::setNumTransactions(int count) void OverviewPage::setModel(WalletModel *model) { this->model = model; - if(model) + if(model && model->getOptionsModel()) { // Set up transaction list TransactionFilterProxy *filter = new TransactionFilterProxy(); @@ -163,17 +163,23 @@ void OverviewPage::setModel(WalletModel *model) setNumTransactions(model->getNumTransactions()); connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int))); - connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(displayUnitChanged())); + connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); } + + // update the display unit, to not use the default ("BTC") + updateDisplayUnit(); } -void OverviewPage::displayUnitChanged() +void OverviewPage::updateDisplayUnit() { - if(!model || !model->getOptionsModel()) - return; - if(currentBalance != -1) - setBalance(currentBalance, currentUnconfirmedBalance); + if(model && model->getOptionsModel()) + { + if(currentBalance != -1) + setBalance(currentBalance, currentUnconfirmedBalance); - txdelegate->unit = model->getOptionsModel()->getDisplayUnit(); - ui->listTransactions->update(); + // Update txdelegate->unit with the current unit + txdelegate->unit = model->getOptionsModel()->getDisplayUnit(); + + ui->listTransactions->update(); + } } diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h index 1199227168..99fe486494 100644 --- a/src/qt/overviewpage.h +++ b/src/qt/overviewpage.h @@ -40,7 +40,7 @@ private: TxViewDelegate *txdelegate; private slots: - void displayUnitChanged(); + void updateDisplayUnit(); }; #endif // OVERVIEWPAGE_H diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index b4029aa0d2..33a18e4d66 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -46,10 +46,11 @@ void SendCoinsDialog::setModel(WalletModel *model) entry->setModel(model); } } - if(model) + if(model && model->getOptionsModel()) { setBalance(model->getBalance(), model->getUnconfirmedBalance()); connect(model, SIGNAL(balanceChanged(qint64, qint64)), this, SLOT(setBalance(qint64, qint64))); + connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); } } @@ -202,7 +203,7 @@ SendCoinsEntry *SendCoinsDialog::addEntry() ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint()); QCoreApplication::instance()->processEvents(); QScrollBar* bar = ui->scrollArea->verticalScrollBar(); - if (bar) + if(bar) bar->setSliderPosition(bar->maximum()); return entry; } @@ -286,3 +287,12 @@ void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance) int unit = model->getOptionsModel()->getDisplayUnit(); ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance)); } + +void SendCoinsDialog::updateDisplayUnit() +{ + if(model && model->getOptionsModel()) + { + // Update labelBalance with the current balance and the current unit + ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), model->getBalance())); + } +} diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h index 5dcbfbeb61..2498a9a71e 100644 --- a/src/qt/sendcoinsdialog.h +++ b/src/qt/sendcoinsdialog.h @@ -47,8 +47,8 @@ private: private slots: void on_sendButton_clicked(); - void removeEntry(SendCoinsEntry* entry); + void updateDisplayUnit(); }; #endif // SENDCOINSDIALOG_H diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index c8242d8352..599a804c46 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -68,6 +68,10 @@ void SendCoinsEntry::on_payTo_textChanged(const QString &address) void SendCoinsEntry::setModel(WalletModel *model) { this->model = model; + + if(model && model->getOptionsModel()) + connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); + clear(); } @@ -82,10 +86,8 @@ void SendCoinsEntry::clear() ui->addAsLabel->clear(); ui->payAmount->clear(); ui->payTo->setFocus(); - if(model && model->getOptionsModel()) - { - ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); - } + // update the display unit, to not use the default ("BTC") + updateDisplayUnit(); } void SendCoinsEntry::on_deleteButton_clicked() @@ -160,3 +162,11 @@ void SendCoinsEntry::setFocus() ui->payTo->setFocus(); } +void SendCoinsEntry::updateDisplayUnit() +{ + if(model && model->getOptionsModel()) + { + // Update payAmount with the current unit + ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); + } +} diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h index cdbf893264..db6cba0d80 100644 --- a/src/qt/sendcoinsentry.h +++ b/src/qt/sendcoinsentry.h @@ -45,6 +45,7 @@ private slots: void on_payTo_textChanged(const QString &address); void on_addressBookButton_clicked(); void on_pasteButton_clicked(); + void updateDisplayUnit(); private: Ui::SendCoinsEntry *ui; diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp index 70c20be0ea..a281c39ca5 100644 --- a/src/qt/test/uritests.cpp +++ b/src/qt/test/uritests.cpp @@ -59,7 +59,7 @@ void URITests::uriTests() QVERIFY(rv.address == QString("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W")); QVERIFY(rv.label == QString()); - // We currently dont implement the message paramenter (ok, yea, we break spec...) + // We currently don't implement the message parameter (ok, yea, we break spec...) uri.setUrl(QString("bitcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?req-message=Wikipedia Example Address")); QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv)); diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 5f505f444e..fb009387bb 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -218,6 +218,8 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(update())); timer->start(MODEL_UPDATE_DELAY); + + connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); } TransactionTableModel::~TransactionTableModel() @@ -619,3 +621,8 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex } } +void TransactionTableModel::updateDisplayUnit() +{ + // emit dataChanged to update Amount column with the current unit + emit dataChanged(index(0, Amount), index(priv->size()-1, Amount)); +} diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index db88a0604f..3efeaa61bc 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -74,6 +74,8 @@ private: private slots: void update(); +public slots: + void updateDisplayUnit(); friend class TransactionTablePriv; }; diff --git a/src/test/mruset_tests.cpp b/src/test/mruset_tests.cpp index ca5a1f1b12..64a6678a73 100644 --- a/src/test/mruset_tests.cpp +++ b/src/test/mruset_tests.cpp @@ -71,7 +71,7 @@ int static permute(int n) return ret; } -// Test that an mruset acts like a moving window, if no duplcate elements are added +// Test that an mruset acts like a moving window, if no duplicate elements are added BOOST_AUTO_TEST_CASE(mruset_window) { mruset<int> mru(MAX_SIZE); diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp index 8ae9290fcc..521b787d0d 100644 --- a/src/test/multisig_tests.cpp +++ b/src/test/multisig_tests.cpp @@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1) BOOST_CHECK(ExtractAddresses(s, whichType, addrs, nRequired)); BOOST_CHECK(addrs[0] == keyaddr[0]); BOOST_CHECK(addrs[1] == keyaddr[1]); - BOOST_CHECK(nRequired = 1); + BOOST_CHECK(nRequired == 1); BOOST_CHECK(IsMine(keystore, s)); BOOST_CHECK(!IsMine(emptykeystore, s)); BOOST_CHECK(!IsMine(partialkeystore, s)); diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 7a438e5d51..e6c00e39d8 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -34,9 +34,9 @@ BOOST_FIXTURE_TEST_CASE(rpc_addmultisig, TestNetFixture) rpcfn_type addmultisig = tableRPC["addmultisigaddress"]->actor; // old, 65-byte-long: - const char* address1Hex = "0434e3e09f49ea168c5bbf53f877ff4206923858aab7c7e1df25bc263978107c95e35065a27ef6f1b27222db0ec97e0e895eaca603d3ee0d4c060ce3d8a00286c8"; + const char address1Hex[] = "0434e3e09f49ea168c5bbf53f877ff4206923858aab7c7e1df25bc263978107c95e35065a27ef6f1b27222db0ec97e0e895eaca603d3ee0d4c060ce3d8a00286c8"; // new, compressed: - const char* address2Hex = "0388c2037017c62240b6b72ac1a2a5f94da790596ebd06177c8572752922165cb4"; + const char address2Hex[] = "0388c2037017c62240b6b72ac1a2a5f94da790596ebd06177c8572752922165cb4"; Value v; CBitcoinAddress address; @@ -62,7 +62,7 @@ BOOST_FIXTURE_TEST_CASE(rpc_addmultisig, TestNetFixture) string short1(address1Hex, address1Hex+sizeof(address1Hex)-2); // last byte missing BOOST_CHECK_THROW(addmultisig(createArgs(2, short1.c_str()), false), runtime_error); - string short2(address1Hex+2, address1Hex+sizeof(address1Hex)); // first byte missing + string short2(address1Hex+1, address1Hex+sizeof(address1Hex)); // first byte missing BOOST_CHECK_THROW(addmultisig(createArgs(2, short2.c_str()), false), runtime_error); } diff --git a/src/util.cpp b/src/util.cpp index a40771417b..66d33485fe 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -994,7 +994,7 @@ void ShrinkDebugFile() // "Never go to sea with two chronometers; take one or three." // Our three time sources are: // - System clock -// - Median of other nodes's clocks +// - Median of other nodes clocks // - The user (asking the user to fix the system clock if the first two disagree) // static int64 nMockTime = 0; // For unit testing @@ -1257,7 +1257,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) { return false; } // --> may result in deadlock between the two threads, depending on when they run. // Solution implemented here: // Keep track of pairs of locks: (A before B), (A before C), etc. -// Complain if any thread trys to lock in a different order. +// Complain if any thread tries to lock in a different order. // struct CLockLocation diff --git a/src/util.h b/src/util.h index ef15260773..77334da7c8 100644 --- a/src/util.h +++ b/src/util.h @@ -423,7 +423,7 @@ inline int64 GetPerformanceCounter() #else timeval t; gettimeofday(&t, NULL); - nCounter = t.tv_sec * 1000000 + t.tv_usec; + nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec; #endif return nCounter; } diff --git a/src/wallet.h b/src/wallet.h index 9e451f89d6..1e5182073c 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -67,7 +67,7 @@ private: // the current wallet version: clients below this version are not able to load the wallet int nWalletVersion; - // the maxmimum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded + // the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded int nWalletMaxVersion; public: |