Commit graph

127 commits

Author SHA1 Message Date
Jaromil 84c3fb07b0 directory re-organization (keeps the old build system)
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
2011-04-23 12:10:25 +02:00
Gavin Andresen 64ad448adc Better wording for transaction fee notification messages 2011-04-20 18:08:01 -04:00
Pieter Wuille 8857aeb223 Monitor incoming transactions for spends by (a copy of) your own wallet 2011-04-20 11:39:15 -04:00
Pieter Wuille 6a76c60e6c Automatically rescan after restoring wallet.dat
Information about the best known chain is added to wallet.dat. If this
information does not match the data in blkindex.dat, a rescan is automatically
performed, starting from the the last known block. When upgrading from a wallet
which does not have this information, no rescan is done automatically.
2011-04-18 17:37:47 -04:00
Gavin Andresen b37f09aa2e New checkpoint at block 118,000 2011-04-13 14:30:22 -04:00
Gavin Andresen 485dda9774 Merge branch 'listimmature' of /Users/gavin/src/gavin_btc 2011-04-12 17:31:31 -04:00
Gavin Andresen d89d456655 Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin 2011-04-12 17:27:15 -04:00
Pieter Wuille c59b6f704c Bugfix for spentpertxout: slow startup
When starting the client, ReacceptWalletTransaction didn't skip spent transactions in its loop, and processed all old spent transactions again.
2011-04-12 21:01:11 +02:00
Gavin Andresen 79706a8e48 Merge branch 'upnp' of https://github.com/TheBlueMatt/bitcoin 2011-04-12 14:22:12 -04:00
Gavin Andresen 2e8b33824f Merge branch 'spentpertxout' of https://github.com/sipa/bitcoin 2011-04-12 13:31:44 -04:00
Pieter Wuille aca3f961db select transaction outputs separately
Update to SelectCoins and CreateTransaction to select source transaction outputs separately instead of per whole transaction.
2011-04-12 19:29:36 +02:00
Pieter Wuille 335e878be8 Spent per txout
Change some internal data structures to keep track of spentness of each wallet transaction output separately, to support partially-spent transactions:
* an update to the data structures (vfSpent in CWalletTx instead of fSpent)
* a backward-compatible update to the wallet disk format. Old clients reading back an updated wallet will ignore partially spent transactions when creating new ones, and may report a wrong balance, though.
* some helper functions (CWalletTx: IsSpent, MarkSpent, MarkDirty to reset cached values, GetAvailableCredit which only counts unredeemed outputs)
2011-04-12 19:29:36 +02:00
Gavin Andresen 198fd7b0bd Report immature coinbase transactions in listtransactions
Report coin generation transactions as 'category':'immature' until they have 120 confirmations (when they are reported as 'category':'generate', as before).
If the block they are in is not part of the main chain (you lost a 'block race'), then they are reported as 'category':'orphan' (with 0 confirmations).
2011-04-05 21:18:26 -04:00
Jeff Garzik f5f1878ba1 Fix deadlocks in setaccount, sendfrom RPC calls
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
2011-04-04 22:24:35 -04:00
Matt Corallo 8bb5edc1c9 Allow UPnP mapping when USE_UPNP is defined and miniupnpc is installed at 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.
2011-03-30 20:45:56 +02:00
Gavin Andresen 27b7f3b43a Merge branch 'shy' 2011-03-14 09:15:06 -04:00
Gavin Andresen 2abd56f428 Merge branch 'limitfree' of /Users/gavin/src/integration_btc 2011-03-13 17:15:44 -04:00
Gavin Andresen dfd059173d Merge branch 'subcent-change' of https://github.com/tcatm/bitcoin 2011-03-13 17:15:28 -04:00
Gavin Andresen b931ed8563 sendmany RPC command, to send to multiple recipients in one transaction. 2011-03-13 17:11:49 -04:00
Gavin Andresen 88abf70386 Make sure rate-limiting code is thread-safe 2011-03-13 14:38:07 -04:00
Gavin Andresen 5de8b54c51 Continuously rate-limit free transactions.
Changed algorithm to use continuous exponential function instead of discrete 10-minute window.
Changed -limitfreerelay to be kilobytes-per-minute instead of boolean.
2011-03-13 13:38:09 -04:00
Gavin Andresen cbc920d474 shy patch from Hal 2011-03-05 17:13:07 -05:00
Gavin Andresen 395c1f44bd Fix minimum transaction fee calculation mismatch between CreateTransaction and CreateBlock 2011-03-02 16:27:24 -05:00
Luke Dashjr a14bf1946d Bugfix: avoid sub-cent change (lost in fees) whenever possible 2011-03-01 02:10:07 +01:00
David FRANCOIS 98ba262a48 Reset testnet with a new genesis block 2011-02-03 14:21:21 +01:00
Gavin Andresen bd7d9140f9 new checkpoint at block 105,000 2011-01-31 11:26:02 -05:00
Gavin Andresen c90ea2bd6d cpuid instruction clobbers eax/ebx/ecx/edx 2011-01-22 16:04:07 -05:00
Gavin Andresen 245e1b4fdb Merge branch '4wayswitch' of https://github.com/dooglus/bitcoin into integration 2011-01-20 16:21:59 -05:00
Chris 8b8d59eefb Don't use GetBoolArg() and mapArgs; use one or the other. 2011-01-20 12:26:33 -08:00
Gavin Andresen d9574c2f14 Reconcile getbalance and listaccounts 0 in the shared-wallet case
If you copied your wallet and used it on two different machines, the balance reported by getbalance and the sum(listaccounts) could disagree, because you might receive payments for an address that is in your wallet but not your address book.  Now all such transactions are credited to the default empty-string account.
2011-01-20 13:10:01 -05:00
Gavin Andresen 1d23c74361 ReacceptWalletTransactions bugfix
Fix two bugs that can happen if you copy your wallet to another machine
and perform transactions on both.

First, ReacceptWalletTransactions would notice if the other wallet spent coins, and
would correctly mark the receiving transaction spent.  However, it did not add the spending
transaction to the wallet.  Now it does.

Second, account balances could get out of sync with 'getbalance' because coins received
by the other copy of the wallet were not necessarily detected.  Now ReacceptWalletTransactions
will scan the entire blockchain for transactions that should be in the wallet if it runs
across a 'spent in the other wallet' transaction.

Finally, there was a small bug in the accounts getbalance code-- generated coins with between
100 and 119 confirmations were not being counted in the balance of account "".
2011-01-19 16:50:20 -05:00
Gavin Andresen ddb68acebe Add address to listtransactions output 2010-12-21 13:39:10 -05:00
gavinandresen 809ee79592 New RPC command: listaccounts. New RPC setting -rpctimeout. And listtransactions '*'
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@203 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-16 01:06:03 +00:00
s_nakamoto 986b5e257e correction
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@200 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-12 18:38:02 +00:00
s_nakamoto 97ee01ad89 added some DoS limits, removed safe mode
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@199 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-12 18:20:36 +00:00
gavinandresen a206a23980 IsStandard() check for CScripts: only relay/include in blocks CScripts we can understand.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@197 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-07 13:43:31 +00:00
s_nakamoto f03304a9c7 preps for future client-only mode,
jgarzik's initial download speedup

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@195 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-05 09:29:30 +00:00
gavinandresen bdde31d787 All boolean options/flags now work the same way.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@194 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-12-03 19:38:09 +00:00
gavinandresen bfd471f53e JSON methods: listtransactions, gettransaction, move, sendfrom and getbalance <account>
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@193 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-30 18:58:11 +00:00
s_nakamoto 776d0f3459 new getwork
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@189 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-23 19:16:36 +00:00
s_nakamoto 51d9b435cd small bugfix
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@186 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-20 02:12:03 +00:00
s_nakamoto f35e21e2e4 require some minimal priority for free transactions to slow down transaction spam
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@185 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-19 23:37:05 +00:00
s_nakamoto 683bcb9154 efficiently sort transaction dependencies in one pass
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@184 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-19 20:22:46 +00:00
s_nakamoto e2a186af10 SelectCoins first pass tries not to use coins with less than 6 confirmations
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@177 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-09 19:47:07 +00:00
s_nakamoto 461764cbbe -paytxfee is now per KB,
BitcoinMiner prioritise transactions by how old their dependencies are

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@176 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-08 22:06:07 +00:00
gavinandresen 3b8848fa4e Fix IsInitialBlockDownload if running on testnet
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@175 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-11-04 00:23:00 +00:00
s_nakamoto c891967b6f bugfixes from Dean Gores,
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
2010-10-23 17:43:53 +00:00
s_nakamoto 2ce73dbe85 -- version 0.3.14 release
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@171 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-10-21 16:47:16 +00:00
s_nakamoto 5cbf75324d Gavin's TEST network as -testnet switch, misc fixes
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@168 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-10-19 17:16:51 +00:00
s_nakamoto 83082f04a4 dkaparis: boost::bind build fix for c++0x
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@164 1a98c847-1fd6-4fd8-948a-caf3550aa51b
2010-10-11 15:12:17 +00:00