Commit graph

3411 commits

Author SHA1 Message Date
Gavin Andresen
8b83e2fc2e Merge pull request #2074 from sipa/minor
Two minor inconvenience fixes
2012-12-12 09:10:44 -08:00
Gavin Andresen
59b8a869ab Compile c/objective-c code max compatiblity when RELEASE 2012-12-12 11:31:29 -05:00
Pieter Wuille
622da5df6e Merge pull request #2068 from Diapolo/CheckDiskSpace
some CheckDiskSpace() related changes
2012-12-07 13:33:24 -08:00
Pieter Wuille
3fb9b99cca Allow lengthy block reconnections to be interrupted
When the coin database is out of date with the block database, the
best block in it is automatically switched to. This reconnection
process can take time, so allow it to be interrupted.

This also stops block connection as soon as shutdown is requested,
leading to a faster shutdown.
2012-12-06 22:04:59 +01:00
Pieter Wuille
c8b2e4426b Update the block file counter in database when using -reindex
This problem is like earth (mostly harmless). After/during a
-reindex, it means the statistics about the last block file
reported in debug.log are always of blk00000.dat instead of the
last file. Apart from that, it means a few more database entries
need to be read when finding a file to append to the first time.
2012-12-06 22:04:58 +01:00
Pieter Wuille
d79775a04d Merge pull request #2057 from Diapolo/FlushBlockFile
FlushBlockFile(): check for valid FILE pointer
2012-12-06 01:35:36 -08:00
Wladimir J. van der Laan
25fd38090a Merge pull request #2066 from Diapolo/small_uiint_changes
UI interface changes
2012-12-05 23:30:06 -08:00
Pieter Wuille
cd1391ae4d Merge pull request #2056 from sipa/fix_2052
Fixes for obscure mempool-checkpoint interaction
2012-12-05 14:15:17 -08:00
Pieter Wuille
a485c1b69e Merge pull request #2063 from Diapolo/CDiskBlockPos
add 2 constructors in CDiskBlockPos to simplify class usage
2012-12-05 14:01:03 -08:00
Philip Kaufmann
fa45c26a0e call CheckDiskSpace() before pre-allocating space
- even if we are allowed to fail pre-allocating, it's better to check
  for sufficient space before calling AllocateFileRange() and if we
  are out of disk space return with error()
- the above change allows us to remove the CheckDiskSpace() check
  in CBlock::AcceptBlock()
2012-12-05 14:39:09 +01:00
Philip Kaufmann
15d8ff2029 rework ThreadSafeAskFee() / askFee() functions
- remove unused parameter from ThreadSafeAskFee(), which also results in
  the removal of an orphan translation-string
2012-12-04 21:35:41 +01:00
Philip Kaufmann
7f5a1b529b remove unneeded flag from MSG_INFORMATION and fix an indentation 2012-12-04 21:35:40 +01:00
Gavin Andresen
85887020dc Merge pull request #2055 from redshark1802/master
more specific build instructions for Ubuntu
2012-12-04 07:18:04 -08:00
Pieter Wuille
469e606141 Merge pull request #2058 from sipa/atomicreorg
Make SetBestChain() atomic
2012-12-03 15:11:31 -08:00
Wladimir J. van der Laan
2e2fca4439 Merge pull request #2065 from Diapolo/remove_modal_flag
Bitcoin-Qt: remove obsolete modal flag from GUI APIs
2012-12-03 04:43:18 -08:00
redshark1802
2fdd1a8637 added build instructions for Ubuntu >= 12.04 2012-12-03 13:36:44 +01:00
Philip Kaufmann
3675588a30 Bitcoin-Qt: remove obsolete modal flag from GUI APIs
- as we (can) supply the CClientUIInterface::MODAL flag via the style
  parameter, we don't need a separate bool for checking the modality
2012-12-03 13:24:42 +01:00
Wladimir J. van der Laan
7a8dd98863 Merge pull request #2046 from Diapolo/traymenu
split of createTrayIconMenu() from createTrayIcon() in BitcoinGUI
2012-12-03 01:53:18 -08:00
Philip Kaufmann
a8a4b9673e add 2 constructors in CDiskBlockPos to simplify class usage
- add a default-constructor, which simply calls SetNull() and a
  constructor to directly pass nFile and nPos
- change code to use that new constructors
2012-12-03 10:19:17 +01:00
Pieter Wuille
d33a9218ab Make SetBestChain() atomic
In case a reorganisation fails, the internal state could become
inconsistent (memory only). Previously, a cache per block connect
or disconnect action was used, so blocks could not be applied in
a partial way. Extend this to a cache for the entire reorganisation,
making it atomic entirely. This also simplifies the code a bit.
2012-12-02 01:43:35 +01:00
Philip Kaufmann
b19388dd88 FlushBlockFile(): check for valid FILE pointer
- don't call FileCommit() and fclose() if no valid FILE pointer was
  returned by OpenBlockFile()
2012-12-01 11:36:53 +01:00
Pieter Wuille
cd7fb7d1de Merge pull request #2033 from sipa/kickconflicts
Bugfix: remove conflicting transactions from memory pool
2012-11-30 17:10:07 -08:00
Pieter Wuille
8259c57321 Only send reorged txn to mempool after checkpoint 2012-12-01 02:09:41 +01:00
Gavin Andresen
aaef016a07 Merge pull request #2037 from luke-jr/printpriority
Allow -printpriority without -debug
2012-11-30 16:16:59 -08:00
Pieter Wuille
da26a030b3 Merge pull request #2049 from sipa/testtmp
Make test_bitcoin run in a temp datadir
2012-11-30 15:56:05 -08:00
Pieter Wuille
038784b979 Enable script verification for reorganized mempool tx 2012-12-01 00:45:17 +01:00
Pieter Wuille
487db8a2b1 Make test_bitcoin run in a temp datadir 2012-11-29 22:09:16 +01:00
Pieter Wuille
597fa4cd63 Add GetTempPath() to util 2012-11-29 01:00:35 +01:00
Wladimir J. van der Laan
5c37be2db6 Merge pull request #2044 from Diapolo/backupwallet
do not silently ignore errors on "backupwallet" RPC cmd
2012-11-27 23:41:50 -08:00
Philip Kaufmann
f82102121f split of createTrayIconMenu() from createTrayIcon() in BitcoinGUI
- this allows to setup the trayicon before we have and want a trayicon menu
- should be of great use, when we remove that splash screen
- fixes a small bug with the toggleHideAction icon, which is not only used with
  trayicon but also with the Mac dock
2012-11-27 22:20:43 +01:00
Pieter Wuille
0c50d8b007 Merge pull request #2006 from robbak/make-leveldb-macro
Change 'make' to $(MAKE) in leveldb make command line
2012-11-27 12:49:37 -08:00
Wladimir J. van der Laan
97c8e6389e Merge pull request #1988 from Diapolo/ThreadSafeMessageBox
update CClientUIInterface and remove orphan Wx stuff
2012-11-27 12:34:18 -08:00
Philip Kaufmann
ad525e9c8f do not silently ignore errors on "backupwallet" RPC cmd 2012-11-27 16:27:54 +01:00
Luke Dashjr
2646080e3d Allow -printpriority without -debug 2012-11-26 16:30:54 +00:00
Philip Kaufmann
5350ea4171 update CClientUIInterface and remove orphan Wx stuff
- fix ThreadSafeMessageBox always displays error icon
- allow to specify MSG_ERROR / MSG_WARNING or MSG_INFORMATION without a
  custom caption / title
- allow to specify CClientUIInterface::ICON_ERROR / ICON_WARNING and
  ICON_INFORMATION (which is default) as message box icon
- remove CClientUIInterface::OK from ThreadSafeMessageBox-calls, as
  the OK button will be set as default, if none is specified
- prepend "Bitcoin - " to used captions
- rename BitcoinGUI::error() -> BitcoinGUI::message() and add function
  documentation
- change all style parameters and enum flags to unsigned
- update code to use that new API

- update Client- and WalletModel to use new BitcoinGUI::message() and
  rename the classes error() method into message()
- include the possibility to supply the wanted icon for messages from
  Client- and WalletModel via "style" parameter
2012-11-26 13:32:31 +01:00
Pieter Wuille
231b399952 Bugfix: remove conflicting transactions from memory pool
When a transaction A is in the memory pool, while a transaction B
(which shares an input with A) gets accepted into a block, A was
kept forever in the memory pool.

This commit adds a CTxMemPool::removeConflicts method, which
removes transactions that conflict with a given transaction, and
all their children.

This results in less transactions in the memory pool, and faster
construction of new blocks.
2012-11-25 11:50:35 +01:00
Pieter Wuille
3ed1ccb089 Merge pull request #2004 from alexanderkjeldaas/simplify-cmutexlock
Simplify CMutexLock
2012-11-24 13:55:00 -08:00
Pieter Wuille
7818d230a2 Merge pull request #2013 from sipa/blockheader
Split off CBlockHeader from CBlock
2012-11-24 13:54:12 -08:00
Pieter Wuille
c07a1a6ee4 Merge pull request #1980 from sipa/noreorgsame
Do not reorganize if new branch has same amount of work
2012-11-22 13:33:03 -08:00
Wladimir J. van der Laan
b0e228a4b0 Merge pull request #2024 from Diapolo/fix_qt_crash
Bitcoin-Qt: fix crash on Windows caused by CDBEnv::EnvShutdown()
2012-11-22 02:08:42 -08:00
Gavin Andresen
edf6ba2690 Merge pull request #2031 from gavinandresen/scriptcomment
Add assert and comment for subtle pay-to-script-hash logic
2012-11-21 13:02:40 -08:00
Gavin Andresen
a91efb2d8d Add assert and comment for subtle pay-to-script-hash logic 2012-11-21 13:58:10 -05:00
Philip Kaufmann
be8e1f8479 Bitcoin-Qt: fix crash on Windows caused by CDBEnv::EnvShutdown()
- can be triggerd by just adding -proxy=crashme with 0.7.1
- crash occured, when AppInit2() was left with return false; after the
  first call to bitdb.open() (Step 6 in init)
- this is caused by GetDataDir() or .string() in CDBEnv::EnvShutdown()
  called via the bitdb global destructor
- init fDbEnvInit and fMockDb to false in CDBEnv::CDBEnv()
2012-11-18 14:10:26 +01:00
Wladimir J. van der Laan
4725e96a3a Merge pull request #2022 from Diapolo/fix_#2018
fix pull #2018
2012-11-17 01:00:20 -08:00
Philip Kaufmann
11406c89fe ConnectBlock(): fix error() format to be unsigned
- I introduced the wrong format macro with my former patch (#2018), this
  needs to be signed not unsigned (thanks Luke-Jr)
2012-11-17 09:57:58 +01:00
Wladimir J. van der Laan
98e7771ca1 Merge pull request #2019 from Diapolo/bitcoinstrings_upd
update bitcoinstrings.cpp and bitcoin_en.ts
2012-11-16 17:29:04 -08:00
Philip Kaufmann
baa510b210 update bitcoinstrings.cpp and bitcoin_en.ts 2012-11-16 19:02:39 +01:00
Gavin Andresen
e45d39f9ee Merge pull request #2009 from sipa/fixmove
Prevent RPC 'move' from deadlocking
2012-11-16 08:09:41 -08:00
Pieter Wuille
1fefd2a5bc Merge pull request #2018 from Diapolo/fix_warning
ensure we use our format macros to avoid compilation warnings
2012-11-16 01:56:41 -08:00
Philip Kaufmann
42152c3da9 ensure we use our format macros to avoid compilation warnings
- fixes 2 warnings I observed while compiling on Windows with MinGW
2012-11-16 08:29:47 +01:00