mirror of
https://github.com/cculianu/Fulcrum.git
synced 2026-08-18 13:09:12 +02:00
This PR adds support for synching to Bitcoin Core and serving up data for the BTC chain(s). - BTC vs BCH is auto-detected. The app enters BCH mode or BTC mode depending on the bitcoind's useragent. - The mode of the app is saved to DB on first synch and must match the remote bitcoind's mode on each connection to bitcoind. - In order for us to enter BTC mode, the bitcoind useragent must match the regex: `^/Satoshi.*`, otherwise it is categorized as BCH, and we default to BCH mode. - This means that only Bitcoin Core (/Satoshi..) nodes are supported for BTC mode. - SegWit tx's and blocks are now parsed correctly in BTC mode only. - The `blockchain.address.*` RPC's only work in BCH mode. - If the db says "BTC" and the bitcoind is detected as non-BTC (or vice-versa), the app complains and refuses to continue, exiting with an error message. - Added seed peers files (`servers.json` and `servers_testnet.json`) for peering to BTC nodes. These were taken from latest Electrum master. Peering works as expected on BTC, as it does on BCH. Also in this PR, various fixups: - Bumped version to 1.3.0. - Made the app request the maximum number of open file descriptors on startup (Unix only). It now also prints how many max open files it has detected to the Log. - Miscellaneous code fixups. --- Squashed Commits: * wip * wip - made synchmempool more efficient in both the btc and bch cases. yay! * added btc servers.json * tweaks - use hash ref in synchmempool, plus use easier to read code in transaction.h * Added --btc option and ironed out logic for BTC vs BCH detection and paranoia. Plus more refactoring. * Added support for peering to BTC servers - Moved BCH servers.json into bch/ subdirectory - Also added a key/value pair to the getinfo results for the active coin. * Removed the "your client is vulnerable" messaging It has been 2 years since the exploit -- and now that we are supporting Electrum and potentiallu other clients with all sorts of version numbers, the message may return false positives. It has been disable and commented-out. * Redid BTC vs BCH auto-detect logic, got rid of --btc CLI arg The --btc CLI arg is superfluous. We can just detect the coin based on user agent. Unknown user agents for bitcoind default to BCH. This implies that we cannot use BTC with anything other than Satoshi as the bitcoind, which is fine for now. TODO: Possibly support more BTC bitcoinds in the future, if it proves that Fulcrum becomes popular on BTC. * Updated a comment * Updated some comments * Tweaks, updated comments, updated an error message * Don't use QStringView In this context better to just take a reference to QString * Nits: Updated some comments, made a variable a reference * Added code to raise open file limit on startup, also tweaked db mem allocation * Fickst a typoe * Forgot a paren. * Forgot a colon * Enable the phishing warning for verisons < 3.3.4 again, also for BTC * Disabled blockchain.address.* methods for BTC * Use .arg(str1, str2) in a few places
25 lines
555 B
JSON
25 lines
555 B
JSON
{
|
|
"blackie.c3-soft.com": {
|
|
"t": "62001",
|
|
"s": "62002"
|
|
},
|
|
"tbch4.loping.net": {
|
|
"t": "62001",
|
|
"s": "62002"
|
|
},
|
|
"5dfr3ossuq3kxyc4zsgwqarh37yzlp7b6jc2j7h2gjq6jp7d7zg6fnid.onion": {
|
|
"s": "62002",
|
|
"t": "62001",
|
|
"display": "tbch4.loping.net"
|
|
},
|
|
"electroncash.de": {
|
|
"t": "54003",
|
|
"s": "54004"
|
|
},
|
|
"jktsologn7uprtwn7gsgmwuddj6rxsqmwc2vaug7jwcwzm2bxqnfpwad.onion": {
|
|
"s": "54004",
|
|
"t": "54003",
|
|
"display": "electroncash.de"
|
|
}
|
|
}
|
|
|