aboutsummaryrefslogtreecommitdiff
path: root/db.cpp
Commit message (Collapse)AuthorAgeFilesLines
* directory re-organization (keeps the old build system)Jaromil2011-04-231-1023/+0
| | | | | | | | | | | | | | | | | | | there is no internal modification of any file in this commit files are moved into directories according to established standards in sourcecode distribution; these directories contain: src - Files that are used in constructing the executable binaries, but are not installed. doc - Files in HTML and text format that document usage, quirks of the implementation, and contributor checklists. locale - Files that contain human language translation of strings used in the program contrib - Files contributed from distributions or other third party implementing scripts and auxiliary programs
* Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoinGavin Andresen2011-04-121-1/+3
|\
| * Allow UPnP mapping when USE_UPNP is defined and miniupnpc is installed at ↵Matt Corallo2011-03-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | build time(statically linked). Thanks joepie91 for the translation of the new copyright notices into Dutch. Thanks sipa for the translation of the new copyright notices into French. Thanks megu for the translation of the new copyright notices into Spanish. Thanks justmoon/Blitzboom for the translation of the new copyright notices into German. Thanks Joozero for the translation of the new copyright notices into Italian. Remaining translations were provided by Google Translate.
* | Fix deadlocks in setaccount, sendfrom RPC callsJeff Garzik2011-04-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | SendMoney*() now requires caller to acquire cs_main. GetAccountAddress() now requires caller to acquire cs_main, cs_mapWallet. Ordering is intended to match these two callchains[1]: 1. CRITICAL_BLOCK(cs_main) ProcessMessage(pfrom, strCommand, vMsg) AddToWalletIfMine() AddToWallet(wtx) CRITICAL_BLOCK(cs_mapWallet) 2. CRITICAL_BLOCK(cs_main) ProcessMessage(pfrom, strCommand, vMsg) AddToWalletIfMine() AddToWallet(wtx) CRITICAL_BLOCK(cs_mapWallet) walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "") CRITICAL_BLOCK(cs_mapAddressBook) Spotted by ArtForz. Additional deadlock fixes by Gavin. [1] http://www.bitcoin.org/smf/index.php?topic=4904.msg71897#msg71897
* do not create 'Your Address' accounttcatm2011-01-311-1/+1
|
* New RPC command: listaccounts. New RPC setting -rpctimeout. And ↵gavinandresen2010-12-161-7/+9
| | | | | | listtransactions '*' git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@203 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* fix wallet.dat compatibility problem if you downgrade from 0.3.17 and then ↵s_nakamoto2010-12-061-0/+24
| | | | | | upgrade again git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@196 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* preps for future client-only mode,s_nakamoto2010-12-051-0/+2
| | | | | | jgarzik's initial download speedup git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@195 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* JSON methods: listtransactions, gettransaction, move, sendfrom and ↵gavinandresen2010-11-301-4/+15
| | | | | | getbalance <account> git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@193 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* added boost tuples to serialize.hs_nakamoto2010-11-271-2/+2
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@192 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* new getworks_nakamoto2010-11-231-2/+2
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@189 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* Depracate "label" API, replacing with accountgavinandresen2010-11-221-5/+76
| | | | | | | | | | | New RPC methods: move, sendfrom Change to getbalance (now takes optional [account] argument) Renamed methods with "label" in their names. sendtoaddress returns hexadecimal transaction ID instead of "sent". git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@188 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* added transaction fee setting in UI options menu,s_nakamoto2010-11-211-8/+0
| | | | | | cut free transaction area from 50KB to 26KB git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@187 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* bugfixes from Dean Gores,s_nakamoto2010-10-231-5/+5
| | | | | | | addr system changes, make sure no gen before block 74000 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@173 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* testnet and keypoololdest added to RPC getinfo output. And RPC now sends ↵gavinandresen2010-10-221-0/+9
| | | | | | proper HTTP Date headers. git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@172 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* Gavin's TEST network as -testnet switch, misc fixess_nakamoto2010-10-191-1/+8
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@168 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* key pool for safer wallet backups_nakamoto2010-10-091-0/+65
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@163 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* don't count or spend payments until they have 1 confirmation,s_nakamoto2010-09-301-1/+1
| | | | | | | | misc cleanup, changed internal version number from 312 to 31300 -- version 0.3.13 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@158 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* dropped DB_PRIVATE from dbenv.opens_nakamoto2010-09-121-1/+0
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@153 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* cleanup,s_nakamoto2010-09-071-1/+6
| | | | | | catch some recoverable exceptions and continue git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@148 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* Gavin Andresen: json-rpc return standard error objects with error code numbers,s_nakamoto2010-09-061-2/+31
| | | | | | | json-rpc command line client return exit code, added rpc backupwallet command git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@147 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* propset svn:eol-style natives_nakamoto2010-08-291-805/+805
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@146 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* block index checking on load, extra redundant checks, misc refactorings_nakamoto2010-08-191-3/+8
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@140 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* do an extra CheckBlock in ConnectBlocks_nakamoto2010-08-161-12/+1
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@139 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* erase the bad chain after disconnecting its_nakamoto2010-08-161-0/+12
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@138 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* blocks-1,s_nakamoto2010-08-161-0/+23
| | | | | | verify block chain on load, so wouldn't have needed to delete blk*.dat, it would have done a reorg automatically git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@137 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* new safety feature displays a warning message and locks down RPC if it ↵s_nakamoto2010-08-031-0/+13
| | | | | | | | detects a problem that may require an upgrade -- version 0.3.8 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@122 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* bitcoind now compiles without wxWidgets or wxBases_nakamoto2010-07-261-1/+1
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@112 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* Gavin Andresen's JSON-RPC HTTP authentication,s_nakamoto2010-07-251-6/+30
| | | | | | | faster initial block download -- version 0.3.3 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@109 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* fix openssl linkage problems,s_nakamoto2010-07-151-0/+2
| | | | | | disable minimize to tray on Linux because it has too many problems including a CPU peg bug git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@103 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* automatically change displayed address whenever it receives anything,v0.2.10s_nakamoto2010-06-101-5/+4
| | | | | | | | | | added help and -? for daemon command line rpc commands, only relay addr messages to 5 random nodes to save bandwidth, started setting wtx.fFromMe flag, trickle out tx inventory messages to protect privacy -- version 0.2.10 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@81 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* transaction filter tabs instead of view->show generated v0.2.5s_nakamoto2010-02-211-2/+0
| | | | | | -- version 0.2.5 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@69 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* strip out unfinished product, review and market stuff, s_nakamoto2010-02-151-21/+0
| | | | | | enable _() instead of wxT() in uiproject.fbp so it uses wxGetTranslation for the wxFormBuilder generated part of the UI git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@64 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* update fSpent flag on wallet transactions if they're seen spent in case copy ↵s_nakamoto2010-02-031-5/+8
| | | | | | | | | | | of wallet.dat was used elsewhere or restored from backup, better error dialog box if try to spend already spent coins, got rid of unused notebook with only one tab on main dialog, nicer looking About dialog, resize About dialog better on linux git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@55 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* simplify AddAddress, s_nakamoto2010-01-281-3/+1
| | | | | | | | readcompactsize limit, fixed a 64-bit compile error in serialize.h, change status "# blocks" to "# confirmations" and widen the column. git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@53 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* restrict file permissions on linux to the user onlys_nakamoto2009-12-131-1/+1
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@47 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* misc exit code, updated setup.nsis_nakamoto2009-12-131-0/+1
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@46 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* miscs_nakamoto2009-12-111-0/+1
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@45 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* retry IRC if name in use, s_nakamoto2009-12-111-3/+18
| | | | | | | | resize to fit ubuntu's giant default font, scroll debug.log, pause gen during initial block download git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@44 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* bugfix Db::open/close and zombie sockets bugs fix double-close of socket handle,s_nakamoto2009-11-181-41/+89
| | | | | | | | | | keep databases open, close db cursors, initial block download in batches of 500 blocks, fix misc warnings, subver linux-test8 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@40 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* monitor ThreadSocketHandler and terminate and restart if hung, convert ↵s_nakamoto2009-11-131-1/+8
| | | | | | _beginthread to CreateThread wrapper, disconnect inactive connections, ping, break up long messages to speed up initial download, better priorities for initiating connections, track how many nodes have requested our blocks and transactions, status #/offline and warning message on unsent blocks, minimize on close as separate option -- linux-test5 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@38 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* UI tweaks, use BindListenPort to detect instance already running, ↵s_nakamoto2009-11-071-1/+1
| | | | | | setsockopt(SO_REUSEADDR) so can bind during TIME_WAIT after exit and restart git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@35 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* got rid of CheckForShutdown, replaced some thread-unsafe wxWidgets calls, ↵s_nakamoto2009-11-061-1/+1
| | | | | | Linux fixes, socket send MSG_NOSIGNAL, bind INADDR_ANY, works reliably on Linux now except if wxMessageBox is used in a thread other than the GUI thread git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@33 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* unix build merged in, bitmap resources from xpm instead of rc, better addr ↵s_nakamoto2009-11-051-7/+3
| | | | | | relay, better selection of addrs by time last seen for faster connect git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@32 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* move debug.log and db.log to data dir, portable GetDataDir, optimize ↵s_nakamoto2009-11-011-8/+11
| | | | | | GetBalance, fix repaint bogdown, -addnode and -? switches git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@25 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* better wallet.dat flush, consolidated QueryPerformanceCounter, PRI64d printf ↵s_nakamoto2009-10-291-23/+53
| | | | | | portability git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@20 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* addr relaying fixes, proxy option and privacy patches, detect connect to ↵s_nakamoto2009-10-291-6/+13
| | | | | | self, non-final tx locktime changes, fix hide unconfirmed generated git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@18 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* flush wallet.dat, multi-proc, reorg options, revert to startup folder shortcuts_nakamoto2009-10-211-12/+45
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@15 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* tray icon + ask before closingsirius-m2009-09-241-0/+5
| | | | git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@10 1a98c847-1fd6-4fd8-948a-caf3550aa51b
* First commitsirius-m2009-08-301-0/+614
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@1 1a98c847-1fd6-4fd8-948a-caf3550aa51b