aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | CTxMemPool::accept(): do not log FetchInputs failure redundantlyJeff Garzik2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | CTxMemPool: consolidate two frequently-printed debug.log lines into oneJeff Garzik2012-05-101-2/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Clean up warningsPieter Wuille2012-05-091-3/+3
| | | | | | | | | | | | | | | | | | * Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
* | | Merge branch 'tmp-ipv6' into merge-ipv6Jeff Garzik2012-05-081-11/+18
|\ \ \
| * | | Support for multiple local addressesPieter Wuille2012-05-041-9/+14
| | | |
| * | | Add -seednode connections, and use this for -dnsseed + -proxydnsPieter Wuille2012-05-041-2/+4
| |/ /
* | | Merge pull request #1180 from jgarzik/sign-compareJeff Garzik2012-05-081-1/+1
|\ \ \ | | | | | | | | Fix final sign comparison warnings
| * | | OpenBlockFile(): cast to eliminate signed/unsigned comparison warningJeff Garzik2012-05-011-1/+1
| |/ / | | | | | | | | | | | | | | | nFile's null value is -1. Cast that to unsigned int, to avoid warning. Additionally, avoid nFile==0 because the first valid value is 1.
* | | Merge pull request #841 from sipa/getalltransactionsGregory Maxwell2012-05-081-1/+25
|\ \ \ | | | | | | | | gettransaction RPC for non-wallet transactions
| * | | gettransaction RPC for non-wallet transactionsPieter Wuille2012-04-181-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Works for wallet transactions, memory-pool transaction and block chain transactions. Available for all: * txid * version * locktime * size * coinbase/inputs/outputs * confirmations Available only for wallet transactions: * amount * fee * details * blockindex Available for wallet transactions and block chain transactions: * blockhash * time
* | | | Merge pull request #883 from sipa/loadblockGregory Maxwell2012-05-081-0/+56
|\ \ \ \ | | | | | | | | | | Add -loadblock to load from an external blk000?.dat file
| * | | | -loadblock to load from an external blk000?.dat filePieter Wuille2012-04-221-0/+56
| |/ / /
* | | | Prevent stuck download: correct solutionPieter Wuille2012-05-061-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Bugfix: %-12I64d is not valid and causes the parameter to be skipped, use ↵Luke Dashjr2012-05-051-1/+1
| |/ / |/| | | | | | | | %12"PRI64d" instead
* | | Check earlier for blocks with duplicate transactions. Fixes #1167v0.6.1rc2Gavin Andresen2012-04-301-0/+10
| | |
* | | Add casts for unavoidable signed/unsigned comparisonsJeff Garzik2012-04-231-5/+5
| | | | | | | | | | | | | | | At these code sites, it is preferable to cast rather than change a variable's type.
* | | Test ScriptSigArgsExpected() for error, before accumulating return valueJeff Garzik2012-04-231-2/+9
| | |
* | | SigOp and orphan-tx constants and counts are always unsigned.Jeff Garzik2012-04-231-11/+11
|/ / | | | | | | Fixes several sign-comparison warnings.
* | Merge remote-tracking branch 'jgarzik/mempool'Pieter Wuille2012-04-171-71/+72
|\ \
| * | CTxMemPool: add helper methods, to reduce global mempool.mapTx accessesJeff Garzik2012-04-151-8/+16
| | |
| * | CTxMemPool: encapsulate AcceptToMemoryPoolJeff Garzik2012-04-151-40/+46
| | |
| * | CTxMemPool: encapsulate AddToMemoryPoolUnchecked(), RemoveFromMemoryPool(),Jeff Garzik2012-04-151-23/+19
| | | | | | | | | | | | and nPooledTx
| * | New class CTxMemPool, encapsulating TX memory pool data membersJeff Garzik2012-04-151-30/+29
| | |
* | | Merge pull request #1117 from sipa/deadlockfixPieter Wuille2012-04-171-2/+2
|\ \ \ | | | | | | | | Fix potential deadlock
| * | | Fix potential deadlockPieter Wuille2012-04-171-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflict: * cs_main in ProcessMessages() (before calling ProcessMessages) * cs_vSend in CNode::BeginMessage versus: * cs_vSend in ThreadMessageHandler2 (before calling SendMessages) * cs_main in SendMessages Even though cs_vSend is a try_lock, if it succeeds simultaneously with the locking of cs_main in ProcessMessages(), it could cause a deadlock.
* | | Further reduce header dependenciesPieter Wuille2012-04-171-9/+9
| | | | | | | | | | | | | | | | | | | | | This commit removes the dependency of serialize.h on PROTOCOL_VERSION, and makes this parameter required instead of implicit. This is much saner, as it makes the places where changing a version number can have an influence obvious.
* | | Remove headers.hPieter Wuille2012-04-171-1/+1
| | |
* | | Merge pull request #1106 from jgarzik/sign-compareGavin Andresen2012-04-171-19/+19
|\ \ \ | | | | | | | | Fix many sign-comparison warnings found in bitcoin codebase
| * | | Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik2012-04-151-19/+19
| |/ / | | | | | | | | | | | | foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
* | | main.cpp: replace tabs with spacesJeff Garzik2012-04-171-5/+5
| | | | | | | | | | | | Sometimes they sneak in through the 'vi' door
* | | AlreadyHave(): only hold lock during mapTransactions accessJeff Garzik2012-04-171-2/+6
| | |
* | | Merge pull request #1094 from jgarzik/already-have-lockingJeff Garzik2012-04-171-2/+11
|\ \ \ | | | | | | | | Locking fix for AlreadyHave()
| * | | Locking fix for AlreadyHave()Jeff Garzik2012-04-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | Access to mapTransactions[] must be guarded by cs_mapTransactions lock. Also, reformat long lines to make the switch statement more readable.
* | | | Merge pull request #1081 from jgarzik/pongJeff Garzik2012-04-171-8/+31
|\ \ \ \ | |_|/ / |/| | | BIP 0031: pong message
| * | | Replace several network protocol version numbers with named constantsJeff Garzik2012-04-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | stored in version.h. Also, a minor CAddress code reformat while we're in there, fixing some incorrect indentation.
| * | | BIP 0031: pong messageJeff Garzik2012-04-121-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a pong message that is sent in reply to a ping. It echoes back a nonce field that is now added to the ping message. Send a nonce of zero in ping messages. Original author: Mike Hearn @ Google Modified Mike's change to introduce a mild form of protocol documentation in version.h.
* | | | fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan2012-04-151-0/+4
| | | |
* | | | Database micro-optimization for "tx" network messageJeff Garzik2012-04-131-8/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | Open database once per "tx" message, rather than multiple times, in the case of orphan transaction presence. As a side effect, a now-unused CTransaction::AcceptToMemoryPool() variant is removed.
* | | Remove obsolete Win32 AffinityBugWorkaround()Jeff Garzik2012-04-121-2/+0
|/ / | | | | | | | | | | Reference miner exists for testnet-in-a-box type situations, and as a reference. We don't care enough about highly optimized internal mining to keep workarounds like this.
* | Use filesystem::path instead of manual string tinkeringPieter Wuille2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Where possible, use boost::filesystem::path instead of std::string or char* for filenames. This avoids a lot of manual string tinkering, in favor of path::operator/. GetDataDir is also reworked significantly, it now only keeps two cached directory names (the network-specific data dir, and the root data dir), which are decided through a parameter instead of pre-initialized global variables. Finally, remove the "upgrade from 0.1.5" case where a debug.log in the current directory has to be removed.
* | Merge pull request #1054 from sipa/buildinfoPieter Wuille2012-04-101-5/+0
|\ \ | | | | | | Build identification strings
| * | Build identification stringsPieter Wuille2012-04-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All client version information is moved to version.cpp, which optionally (-DHAVE_BUILD_INFO) includes build.h. build.h is automatically generated on supporting platforms via contrib/genbuild.sh, using git describe. The git export-subst attribute is used to put the commit id statically in version.cpp inside generated archives, and this value is used if no build.h is present. The gitian descriptors are modified to use git archive instead of a copy, to create the src/ directory in the output. This way, src/src/version.cpp will contain the static commit id. To prevent gitian builds from getting the "-dirty" marker in their git-describe generated identifiers, no touching of files or running sed on the makefile is performed anymore. This does not seem to influence determinism.
* | | Use scoped locks instead of CRITICAL_BLOCKPieter Wuille2012-04-091-30/+42
|/ /
* | qtui.h/noui.h interface cleanupWladimir J. van der Laan2012-04-041-1/+1
| | | | | | | | | | | | | | - rename wxMessageBox, remove redundant arguments to noui/qtui calls - also, add flag to force blocking, modal dialog box for disk space warning etc - clarify function naming - no more special MessageBox needed from AppInit2, as window object is created before calling AppInit2
* | support RPC stop and encryptwallet with UIWladimir J. van der Laan2012-04-041-1/+1
| |
* | remove unused CalledSetStatusBar and UIThreadCall notificationsWladimir J. van der Laan2012-04-041-3/+0
| |
* | Merge pull request #951 from TheBlueMatt/headerslimitGavin Andresen2012-04-021-2/+2
|\ \ | |/ |/| Limit getheaders to a hard 2000.
| * Limit getheaders to a hard 2000.Matt Corallo2012-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously getheaders would return any number of headers up to 2000 + the distance the locator parameter was back (which is up to ~ the number of items in the locator ^ 2). The only client I was able to find which actually handles the headers message is BitcoinJ, and it clearly expects no more than 2000 headers See: http://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/core/HeadersMessage.java#35 Additionally, the wiki clearly states that getheaders will only ever return 2000 headers: https://en.bitcoin.it/wiki/Network#Messages
* | Merge branch 'addrman' of https://github.com/sipa/bitcoinGavin Andresen2012-03-221-53/+13
|\ \
| * | CAddrMan: stochastic address managerPieter Wuille2012-02-241-53/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Design goals: * Only keep a limited number of addresses around, so that addr.dat does not grow without bound. * Keep the address tables in-memory, and occasionally write the table to addr.dat. * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. See comments in addrman.h for more detailed information.