Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p),
and track whether we are likely to able to connect to it. Addresses in
"addr" messages outside of our network get limited relaying and are not
stored in addrman.
There are plans to let Bitcoin function as Tor/I2P hidden service.
To do so, we could use the established encoding provided by OnionCat
and GarliCat (without actually using those tools) to embed Tor/I2P
addresses in IPv6.
This patch makes these addresses considered routable, so they can
travel over the Bitcoin network in 'addr' messages. This will hopefully
make it easier to deploy real hidden service support later.
This will make bitcoin relay valid routable IPv6 addresses, and when
USE_IPV6 is enabled, listen on IPv6 interfaces and attempt connections
to IPv6 addresses.
FetchInputs already logs failures internally. This commit makes the logging
more consistent with other FetchInputs callsites also.
Prior to this commit, two log lines were logged for one condition:
ERROR: FetchInputs() : de15fde415 mempool Tx prev not found a2c75da227
ERROR: CTxMemPool::accept() : FetchInputs failed de15fde415
After this commit, only one line is logged:
ERROR: FetchInputs() : e0507ab2c7 mempool Tx prev not found 9a620262cd
Previously, a single TX would trigger two log lines in quick succession,
addUnchecked(): size 152
CTxMemPool::accept() : accepted c4cfdd48b7
After this change, only one log line is used:
CTxMemPool::accept() : accepted 98885e65db (poolsz 26)
Change internal HTTP JSON-RPC server from single-threaded to
thread-per-connection model. The IP filter list is applied prior to starting
the thread, which then processes the RPC.
A mutex covers the entire RPC operation, because not all RPC operations are
thread-safe.
[minor modifications by jgarzik, to make change upstream-ready]
This is an Object specifying how to decompose specific elements.
Currently supported:
- "tx": "no", "hash", "hex", "obj"
- "script": "no", "hex", "asm"
Pull request #948 introduced a fix for nodes stuck on a long side branch
of the main chain. The fix was non-functional however, as the additional
getdata request was created in a first step of processing, but dropped
in a second step as it was considered redundant. This commits fixes it
by sending the request directly.
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.
Closes: #1065, #1156