NodeSyncScore() should find the node which we recv data most recently, so put a negative sign to pnode->nLastRecv is indeed wrong.
Also change the return value type to int64_t.
Signed-off-by: Huang Le <4tarhl@gmail.com>
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 09a54a6
Qt5 Removed the qt_mac_set_dock_menu function and left no replacement. It was
later re-added and deprecated for backwards-compatibility.
Qt5.2 adds the non-deprecated QMenu::setAsDockMenu(). Use that when possible.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: c21c74b
This fixes the display on Retina Macbooks. It also moves us away from depending
on the ancient XCode3 sdk.
Conflicts:
doc/release-process.md
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 2869b13
Make DateTimeStrFormat use boost::posix_time.
Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 3e8ac6a
Log the name of the error as well as the error code if a network problem
happens. This makes network troubleshooting more convenient.
Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
Conflicts:
src/netbase.cpp
Rebased-By: Wladimir van der Laan <laanwj@gmail.com>
Rebased-From: a60838d
Pull updated translations from Transifex.
Add mn (Mongolian) language.
Do not update English translation for now as we want to keep
compatibility with 0.9.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 795b921
Fixes#4156.
The problem is that the boost::asio::io_service destructor
waits for the acceptors to finish (on windows, and boost 1.55).
Fix this by keeping track of the acceptors and cancelling them before
stopping the event loops.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: cef4494
Make sure conn object always gets cleaned up by using a
`boost::shared_ptr`.
This makes valgrind happy - before this commit, one connection object
always leaked at shutdown, as well as can avoid other leaks, when
for example an exception happens.
Also add an explicit Close() to the !ClientAllowed path to make it similar
to the normal path (I'm not sure whether it is needed, but it
can't hurt).
Rebased-By: Wladimir J. van der Laan
Rebased-From: 1a44522
According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html),
the function signature of the handler must be:
void handler(
const boost::system::error_code& error // Result of operation.
);
We were binding *all* the arguments, instead of all but the error,
resulting in nullary function that never got the error. Fix this
by adding an input argument substitution.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 0a0cd34
Size specifiers are no longer needed now that we use typesafe tinyformat
for string formatting, instead of the system's sprintf.
No functional changes.
This continues the work in #3735.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 783b182
Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 283e405
Help text appears to have been copy/pasted from getrawtransaction,
so it erroneously asked for a txid where rawtransaction hex should appear.
Remove lines which were copy/pasted from getrawtransaction but which
aren't displayed by decoderawtransaction.
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 5cc0133 80c521e
Github-Pull: #4106
- fixes error from debug.log:
QMetaObject::connectSlotsByName: No matching signal for
on_recentRequestsView_selectionChanged(QItemSelection,QItemSelection)
- small style fixes (e.g. alphabetical ordering if includes etc.)
- fixes#3992
Adds two new info query commands that take over information from
hodge-podge `getinfo`.
Also some new information is added:
- `getblockchaininfo`
- `chain`: (string) current chain (main, testnet3, regtest)
- `verificationprogress: (numeric) estimated verification progress
- `chainwork`
- `getnetworkinfo`
- `localaddresses`: (array) local addresses, from mapLocalHost (fixes#1734)
There is no need to use any specific version of boost on Linux/Unix.
Even 1.37 should still work.
Also the mention of boost-dev doesn't belong after adding oldstable.
Remove it. libboost-all-dev is already mentioned earlier.