aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Reorganize(): remove spurious TxnAbort()Jeff Garzik2012-05-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Reorganize() fails, then its caller, CBlock::SetBestChain(), will call TxnAbort(). Redundant TxnAbort() calls are harmless. The second will return an error return value, with no other side effects. TxnAbort() return values are generally never checked. The impact is nil.
* | | | | Merge pull request #1381 from jgarzik/check-deserJeff Garzik2012-05-221-2/+3
|\ \ \ \ \ | | | | | | | | | | | | Prevent crashes due to missing or corrupted database records
| * | | | | Prevent crashes due to missing or corrupted blk????.dat recordsJeff Garzik2012-05-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In LoadExternalBlockFile(), errors are already caught... silently. Add a warning message, even though we do not abort the program due to load error.
* | | | | | ProcessMessage(): remove duplicate orphan tx debug messageJeff Garzik2012-05-221-3/+0
|/ / / / /
* | | | | Merge branch 'master' of github.com:bitcoin/bitcoinGavin Andresen2012-05-221-7/+7
|\ \ \ \ \
| * | | | | Correct debug.log output to show correct function the debug is coming from.R E Broadley2012-05-221-7/+7
| | | | | |
* | | | | | Merge branch 'optimize'Gavin Andresen2012-05-221-27/+61
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Further DoS prevention: Verify signatures lastGavin Andresen2012-05-181-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loop over all inputs doing inexpensive validity checks first, and then loop over them a second time doing expensive signature checks. This helps prevent possible CPU exhaustion attacks where an attacker tries to make a victim waste time checking signatures for invalid transactions.
| * | | | | Remove invalid dependent orphans from memoryGavin Andresen2012-05-181-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove orphan transactions from memory once all of their parent transactions are received and they're still not valid. Thanks to Sergio Demian Lerner for suggesting this fix.
| * | | | | Optimize orphan transaction handlingGavin Andresen2012-05-181-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes suggested by Sergio Demian Lerner to help prevent potential DoS attacks.
| * | | | | Refactor: GetRandHash() method for utilGavin Andresen2012-05-171-5/+3
| | | | | |
* | | | | | Merge pull request #1354 from fanquake/masterPieter Wuille2012-05-201-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update Header Licenses
| * | | | | | Update License in File HeadersFordy2012-05-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* | | | | | | Make testcases build, prevent windows symbol collisionWladimir J. van der Laan2012-05-201-1/+1
| | | | | | |
* | | | | | | Convert UI interface to boost::signals2.Wladimir J. van der Laan2012-05-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Signals now go directly from the core to WalletModel/ClientModel. - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet. - Gets rid of noui.cpp, the few lines that were left are merged into init.cpp - Rename wxXXX message flags to MF_XXX, to make them UI indifferent. - ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
* | | | | | | Fine-grained UI updatesWladimir J. van der Laan2012-05-201-3/+19
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed. This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart. The following notifications were added: - `NotifyBlocksChanged`: Block chain changed - `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed. - `NotifyAddressBookChanged`: Address book entry changed. - `NotifyTransactionChanged`: Wallet transaction added, removed or updated. - `NotifyNumConnectionsChanged`: Number of connections changed. - `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification. These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp). Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
* | | | | | Merge pull request #1296 from Diapolo/CheckDiskSpaceGavin Andresen2012-05-191-3/+3
|\ \ \ \ \ \ | |/ / / / / |/| | | | | make CheckDiskSpace() use 50 * 1024 * 1024 Bytes
| * | | | | make CheckDiskSpace() use a global static const uint64 for checking required ↵Philip Kaufmann2012-05-141-3/+3
| | |/ / / | |/| | | | | | | | | | | | | disk space and remove 2 ugly spaces from a message string
* | | | | Make orphan logging more verbose, displaying mapOrphanTransactions.size()Jeff Garzik2012-05-171-5/+7
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old log message: storing orphan tx df2244f6bc New log message: storing orphan tx df2244f6bc (mapsz 51) Also, trim a few trailing whitespace in main.cpp.
* | | | Merge pull request #1295 from jgarzik/txn-retvalJeff Garzik2012-05-171-3/+9
|\ \ \ \ | | | | | | | | | | [FIX] Always check return values of TxnBegin() and TxnCommit()
| * | | | Always check return values of TxnBegin() and TxnCommit()Jeff Garzik2012-05-141-3/+9
| |/ / /
* | | | Hopefully final fix for the stuck blockchain issuePieter Wuille2012-05-151-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Immediately issue a "getblocks", instead of a "getdata" (which will trigger the relevant "inv" to be sent anyway), and only do so when the previous set of invs led us into a known and attached part of the block tree.
* | | | ensure that no double timestamps show up in the debug.log, by removing ↵Philip Kaufmann2012-05-131-5/+1
|/ / / | | | | | | | | | manual timestamps from the source (now only -logtimestamps parameter adds timestamps to debug.log)
* | | Merge pull request #1021 from sipa/ipv6Pieter Wuille2012-05-111-5/+7
|\ \ \ | | | | | | | | IPv6 node support
| * | | Limited relaying/storing of foreign addressesPieter Wuille2012-05-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | IPv6 node supportPieter Wuille2012-05-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | 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