aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Remove CWalletTx::vfSpentGavin Andresen2014-02-261-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
* | | | Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completelyGavin Andresen2014-02-261-7/+7
|\ \ \ \ | |/ / / |/| | | Remove PRIx64 usage completely
| * | | Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #3305 from mikehearn/fee_dropJeff Garzik2014-02-241-1/+1
|\ \ \ \ | |/ / / |/| | | Drop fees by 10x due to the persistently higher exchange rate.
| * | | Drop fees by 10x due to the persistently higher exchange rate.Mike Hearn2013-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last fee drop was by 5x (from 50k satoshis to 10k satoshis) in the 0.8.2 release which was about 6 months ago. The current fee is (assuming a $500 exchange rate) about 5 dollar cents. The new fee after this patch is 0.5 cents. Miners who prefer the higher fees are obviously still able to use the command line flags to override this setting. Miners who choose to create smaller blocks will select the highest-fee paying transactions anyway. This would hopefully be the last manual adjustment ever required before floating fees become normal.
* | | | Don't use PRIx64 formatting derives from inttypes.hWladimir J. van der Laan2014-02-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the tinyformat-based formatting system (introduced in b77dfdc) is type-safe, no special format characters are needed to specify sizes. Tinyformat can support (ignore) the C99 prefixes such as "ll" but chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't include inttypes.h and define our own for compatibility. (an alternative would be to sweep the entire codebase using sed -i to get rid of the size specifiers but this has less diff impact)
* | | | Merge pull request #2910Wladimir J. van der Laan2014-02-201-1/+24
|\ \ \ \ | | | | | | | | | | | | | | | d8b4b49 Don't store or send side-chain blocks lower than last checkpoint. (Ashley Holman)
| * | | | Don't store or send side-chain blocks lower than last checkpoint.Ashley Holman2014-01-191-1/+24
| | | | |
* | | | | Merge pull request #3666Wladimir J. van der Laan2014-02-171-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | bbfce8a fix non-standard reason string in main.cpp (Philip Kaufmann)
| * | | | fix non-standard reason string in main.cppPhilip Kaufmann2014-02-131-1/+1
| | | | |
* | | | | Merge pull request #3646Wladimir J. van der Laan2014-02-161-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 5770254 Copyright header updates s/2013/2014 on files whose last git commit was done 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. (gubatron)
| * | | | | Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Handle "conflicted" transactions properlyGavin Andresen2014-02-141-1/+9
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend CMerkleTx::GetDepthInMainChain with the concept of a "conflicted" transaction-- a transaction generated by the wallet that is not in the main chain or in the mempool, and, therefore, will likely never be confirmed. GetDepthInMainChain() now returns -1 for conflicted transactions (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed). This makes getbalance, getbalance '*', and listunspent all agree when there are mutated transactions in the wallet. Before: listunspent: one 49BTC output getbalance: 96 BTC (change counted twice) getbalance '*': 46 BTC (spends counted twice) After: all agree, 49 BTC available to spend.
* | | | Add HasCanonicalPushes(), and use it in IsStandardTxPieter Wuille2014-02-111-0/+4
|/ / /
* | | Limit the number of orphan blocksPieter Wuille2014-01-311-1/+27
| | | | | | | | | | | | | | | | | | | | | In case the total number of orphan blocks in memory exceeds a limit (currently set to 750), a random orphan block (which is not depended on by another orphan block) is dropped. This means it will need to be downloaded again, but it won't consume memory until then.
* | | Merge pull request #3592Wladimir J. van der Laan2014-01-301-43/+43
|\ \ \ | | | | | | | | | | | | | | | | c117d9e Support for error messages and a few more rejection reasons (Luke Dashjr) 14e7ffc Use standard BIP 22 rejection reasons where applicable (Luke Dashjr)
| * | | Support for error messages and a few more rejection reasonsLuke Dashjr2014-01-291-8/+8
| | | |
| * | | Use standard BIP 22 rejection reasons where applicableLuke Dashjr2014-01-291-35/+35
| | | |
* | | | Merge pull request #3370 from sipa/headersfirst3Gavin Andresen2014-01-291-220/+271
|\ \ \ \ | |/ / / |/| | | Prepare block connection logic for headers-first
| * | | Prepare block connection logic for headers-first.Pieter Wuille2014-01-271-195/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the block processing logic from "try to atomically switch to a new block" to a continuous "(dis)connect a block, aiming for the assumed best chain". This means the smallest atomic operations on the chainstate become individual block connections or disconnections, instead of entire reorganizations. It may mean that we try to reorganize to one block, fail, and rereorganize again to the old block. This is slower, but doesn't require unbounded RAM. It also means that a ConnectBlock which fails may be no longer called from the ProcessBlock which knows which node sent it. To deal with that, a mapBlockSource is kept, and invalid blocks cause asynchronous "reject" messages and banning (if necessary).
| * | | Move only: extract WriteChainState and UpdatedTip from SetBestChain.Pieter Wuille2014-01-271-60/+63
| | | |
* | | | use english for all reason strings in IsStandardTx()Philip Kaufmann2014-01-281-1/+1
|/ / /
* | | Fix off-by-one errors in use of IsFinalTx()Peter Todd2014-01-261-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously CreateNewBlock() didn't take into account the fact that IsFinalTx() without any arguments tests if the transaction is considered final in the *current* block, when both those functions really needed to know if the transaction would be final in the *next* block. Additionally the UI had a similar misunderstanding. Also adds some basic tests to check that CreateNewBlock() is in fact mining nLockTime-using transactions correctly. Thanks to Wladimir J. van der Laan for rebase.
* | | Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-74/+74
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Typesafe strprintf/error/LogPrint functionsWladimir J. van der Laan2014-01-231-1/+1
|/ / | | | | | | | | | | | | Switch to tinyformat-based formatting. Tinyformat is a typesafe drop-in replacement for C99 printf functions: https://github.com/c42f/tinyformat
* | Merge pull request #3490Wladimir J. van der Laan2014-01-181-8/+8
|\ \ | | | | | | | | | 7e08e29 better std::exception logging for block/undo files (Philip Kaufmann)
| * | better std::exception logging for block/undo filesPhilip Kaufmann2014-01-061-8/+8
| | |
* | | Store orphan blocks in serialized formPieter Wuille2014-01-111-17/+41
|/ /
* | Merge pull request #3401Wladimir J. van der Laan2014-01-061-1/+1
|\ \ | | | | | | | | | | | | | | | 012ca1c LoadWallet: acquire cs_wallet mutex before clearing setKeyPool (Wladimir J. van der Laan) 9569168 Document cs_wallet lock and add AssertLockHeld (Wladimir J. van der Laan) 19a5676 Use mutex pointer instead of name for AssertLockHeld (Wladimir J. van der Laan)
| * | Use mutex pointer instead of name for AssertLockHeldWladimir J. van der Laan2013-12-191-1/+1
| | | | | | | | | | | | | | | This makes it useable for non-global locks such as the wallet and keystore locks.
* | | Move `nTransactionFee` from main.cpp to wallet.cppWladimir J. van der Laan2013-12-131-3/+0
|/ / | | | | | | | | Transaction fee is only used by the wallet. No need for it to be in main.cpp.
* | Add main-specific node statePieter Wuille2013-12-081-12/+90
| |
* | Sanitize assert usage and refuse to compile with NDEBUG.Gregory Maxwell2013-12-021-4/+15
| | | | | | | | | | | | | | | | There were quite a few places where assert() was used with side effects, making operation with NDEBUG non-functional. This commit fixes all the cases I know about, but also adds an #error on NDEBUG because the code is untested without assertions and may still have vulnerabilities if used without assert.
* | Merge pull request #3329 from gavinandresen/syncdebugGavin Andresen2013-12-011-0/+2
|\ \ | | | | | | mutex debugging routines: LocksHeld() and AssertLockHeld()
| * | mutex debugging routines: LocksHeld() and AssertLockHeld()Gavin Andresen2013-11-291-0/+2
| | |
* | | Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-5/+9
| | | | | | | | | | | | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* | | Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen2013-11-301-21/+6
| | | | | | | | | | | | GetValueIn makes more sense as a CTransaction member.
* | | Remove dead transaction replacement codeGavin Andresen2013-11-301-29/+1
|/ / | | | | | | | | | | | | This dead code can be resurrected from git history if transaction replacement is ever implemented. Keeping dead code in the source is a bad idea, because it implies it was tested and worked at some point, which is not true.
* | Store and use a sanitized subVerMike Hearn2013-11-261-5/+7
| |
* | Add some additional logging to give extra network insight.Mike Hearn2013-11-261-5/+11
|/
* cleanup error message consistencyJulian Langschaedel2013-11-221-3/+3
| | | | relicts from the CTransaction refactor.
* Merge pull request #3257Wladimir J. van der Laan2013-11-201-1/+0
|\ | | | | | | 379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
| * core: remove includes in .cpp, if header is already in .hPhilip Kaufmann2013-11-151-1/+0
| | | | | | | | | | - example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
* | pass nBytes as parameter to GetMinFee(..)Cozz Lovan2013-11-141-3/+2
|/
* misc small changes to polish after include cleanupPhilip Kaufmann2013-11-111-9/+9
|
* Merge pull request #3199 from sipa/mempoolmoveGavin Andresen2013-11-101-176/+19
|\ | | | | Cleanup refactoring of coins/mempool
| * Move CCoins-related logic to coins.{cpp.h}Pieter Wuille2013-11-101-166/+4
| |
| * Make CCoinsView use block hashes instead of indicesPieter Wuille2013-11-101-26/+31
| |
* | New reject p2p messageGavin Andresen2013-11-111-46/+123
|/
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-76/+76
| | | | | | | | | 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.