Age | Commit message (Collapse) | Author |
|
9f4da19 Use pong receive time rather than processing time (Pieter Wuille)
|
|
|
|
|
|
|
|
- SO_NOSIGPIPE isn't available on WIN32 so merge the 2 non-WIN32 blocks
- use predefined names from header for IPV6_PROTECTION_LEVEL and
PROTECTION_LEVEL_UNRESTRICTED
|
|
bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.
Make the path explicit so that the old one cannot be found.
Core libs use config/bitcoin-config.h.
Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
|
|
3dc1464 add missing vhListenSocket.clear(); to CNetCleanup() (Philip Kaufmann)
2831a03 remove unused CNode::Cleanup() (Philip Kaufmann)
|
|
d38da59 Code simplifications after CTransaction::GetHash() caching (Pieter Wuille)
4949004 Add CMutableTransaction and make CTransaction immutable. (Pieter Wuille)
|
|
|
|
|
|
|
|
|
|
f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
|
|
|
|
- remove an unneded else in ConnectNode()
- make 0 a double and change to 0.0 in ConnectNode()
- rename strDest to pszDest in OpenNetworkConnection()
- remove an unneded call to our REF() macro in BindListenPort()
- small style cleanups and removal of unneeded new-lines
|
|
... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
|
|
rename fNoListen to fListen and move to net
|
|
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>
|
|
- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
|
|
d4e1c61 add DEFAULT_UPNP constant in net (Philip Kaufmann)
|
|
3e8ac6a Replace non-threadsafe gmtime and setlocale (Wladimir J. van der Laan)
a60838d Replace non-threadsafe strerror (Wladimir J. van der Laan)
|
|
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.
|
|
- as this is a shared Core/GUI setting, this makes it easier to keep them
in sync (also no new includes are needed)
|
|
|
|
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)
|
|
- also small logging text changes
|
|
The year is 2014. All supported operating systems have IPv6 support,
most certainly at build time (this doesn't mean that IPv6 is configured,
of course).
If noone is exercising the functionality to disable it, that means it
doesn't get tested, and IMO it's better to get rid of it.
(it's also not used consistently in RPC/boost and Net code...)
|
|
When we are over our outbound limit ThreadSocketHandler would try to
keep the connection if the peer was addnoded.
This didn't actually work for two reasons: It didn't actually run
the accept code due to mistaken code flow, and because we have a
limited number of outbound semaphores it couldn't actually use the
connection.
Instead it leaked the socket, which might have caused issue #4034.
This patch just takes out the non-functioning white-listing for now.
|
|
a486abd replace custom GetFilesize() with boost::filesystem::file_size() (Philip Kaufmann)
|
|
A slight improvement over 2d2d8fae3d8bc4e82dc631d93c6e19f954bbee04 -- we don't know that it's the daemon, it could be the GUI.
|
|
|
|
When bitcoind can't bind, bitcoin server (or Bitcoin Core Daemon) is probably already running. Add the missing word "server". Bitcoin itself is definitely running ;-)
Add _(...) so the string can be localized.
I apologize for such trivial changes, learning github interface.
|
|
|
|
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h
indirectly, so we cannot fix this with just macros.
Trivial commit: apply the following script to all .cpp and .h files:
# Middle
sed -i 's/"PRIx64"/x/g' "$1"
sed -i 's/"PRIu64"/u/g' "$1"
sed -i 's/"PRId64"/d/g' "$1"
# Initial
sed -i 's/PRIx64"/"x/g' "$1"
sed -i 's/PRIu64"/"u/g' "$1"
sed -i 's/PRId64"/"d/g' "$1"
# Trailing
sed -i 's/"PRIx64/x"/g' "$1"
sed -i 's/"PRIu64/u"/g' "$1"
sed -i 's/"PRId64/d"/g' "$1"
After this commit, `git grep` for PRI.64 should turn up nothing except
the defines in util.h.
|
|
in 2014.
contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
|
|
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.
Remove unnecessary c_str calls (236 of them) in logging and formatting.
|
|
Moved includes of "db.h" into #ifdef ENABLE_WALLET blocks or remove
them.
|
|
80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
|
|
Fixes #3372 -- crash at shutdown.
|
|
|
|
This was a leftover from the times in which
peers.dat depended in BDB.
Other functions in db.cpp still depend on BerkelyDB,
to be able to compile without BDB this (small)
functionality needs to be moved to another file.
|
|
|
|
379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
|
|
|
|
- example: if util.h includes stdint.h, remove it from util.cpp, as
util.h is the first header included in util.cpp
|
|
Use misc methods of avoiding unnecesary header includes.
Replace int typedefs with int##_t from stdint.h.
Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
Normalize QT_VERSION ifs where possible.
Resolve some indirect dependencies as direct ones.
Remove extern declarations from .cpp files.
|
|
|
|
I needed this to test the new "reject" p2p message, but it should be generally
useful for fuzz-testing network message handling code.
|
|
The existing CNode::addrLocal member is revealed to the user,
as an address string, similar to the existing "addr" field.
Instead of showing garbage or empty string,
it simply will not appear in the output if local address not known yet.
|
|
Allow SendMessages to run partially without cs_main
|