Commit graph

369 commits

Author SHA1 Message Date
Wladimir J. van der Laan
d8f5c59a59 show n/a for mined transactions (and send to self) instead of empty field 2011-07-31 17:43:46 +02:00
Wladimir J. van der Laan
05bcf7089e address icons 2011-07-31 17:05:34 +02:00
Matt Corallo
33208fb557 Check for duplicate txins in CheckTransaction. 2011-07-31 14:20:10 +02:00
Wladimir J. van der Laan
dedf83a19b Properly html-escape labels 2011-07-31 12:56:46 +02:00
Wladimir J. van der Laan
a5e1325879 comment update 2011-07-30 19:28:41 +02:00
Wladimir J. van der Laan
f0ec774d9c make sure address book model is up to date after sending coins 2011-07-30 19:21:46 +02:00
Han Lin Yap
8c2143d4d8 Comment "deprecated" 2011-07-30 19:58:22 +03:00
Wladimir J. van der Laan
04f38adf73 Remove unused variable 2011-07-30 18:48:05 +02:00
Wladimir J. van der Laan
2f5d380943 Hide addresses in transaction overview by default, they can be re-shown as a configuration option 2011-07-30 17:42:02 +02:00
Wladimir J. van der Laan
1aafe34a08 Make dot in amount field more apparent 2011-07-30 17:01:31 +02:00
Wladimir J. van der Laan
19fba3cd24 Make debug info more interesting (show SHA160 addresses for inputs) 2011-07-29 23:11:40 +02:00
Wladimir J. van der Laan
3b59297b36 Remove no longer valid comment 2011-07-29 16:16:12 +02:00
Wladimir J. van der Laan
53d65b5500 Merge branch 'master' of https://github.com/bitcoin/bitcoin 2011-07-29 14:45:54 +02:00
Wladimir J. van der Laan
ee014e5b10 Full support for other units, add configuration option for default unit (used when displaying amounts) 2011-07-29 14:36:35 +02:00
Wladimir J. van der Laan
b5b1d1a66b Merge branch 'master' of https://github.com/bitcoin/bitcoin
Conflicts:
	src/script.cpp
2011-07-27 21:44:55 +02:00
Wladimir J. van der Laan
7df001be94 normalize SIGNAL/SLOT signatures (http://marcmutz.wordpress.com/effective-qt/prefer-to-use-normalised-signalslot-signatures/) 2011-07-27 20:54:10 +02:00
Wladimir J. van der Laan
384625c1a6 also accept numbers without dot/decimals for parsing, fixes transaction filter row 2011-07-27 20:52:00 +02:00
Matt Corallo
687c82558c Fix EncryptKeys crash introduced by a9ba4710, identified by TD. 2011-07-27 18:02:39 +02:00
Jeff Garzik
a139ed74f2 CAddrDB::LoadAddresses: properly initialize CAddress
Fixes issue #424
2011-07-26 15:15:55 -04:00
Pieter Wuille
b63241d451 Bugfix: don't overuse limited ExtractAddress
ExtractAddress was called with the keystore as argument in RPC and
UI, limiting results to own keys. This caused empty "address"
fields.
2011-07-26 19:41:47 +02:00
Wladimir J. van der Laan
dd61035645 show amounts in <b>bold</b> in confirmation dialog 2011-07-26 17:37:26 +02:00
Wladimir J. van der Laan
690c723e5f make SetHash160 return a value (as specified in the function signature) 2011-07-26 16:59:31 +02:00
Wladimir J. van der Laan
5326a31249 make SetHash160 return a value (as specified in the function signature) 2011-07-26 16:54:32 +02:00
Wladimir J. van der Laan
491ad6db50 Merge remote branch 'upstream/master'
Conflicts:
	src/bitcoinrpc.cpp
2011-07-26 16:47:23 +02:00
Wladimir J. van der Laan
83c8d678aa Reset unit to default when clearing the field, to prevent confusion 2011-07-26 13:31:59 +02:00
Wladimir J. van der Laan
f2b10f6469 refuse to format nor parse invalid units 2011-07-26 13:27:33 +02:00
Wladimir J. van der Laan
587e52855a allow multiple units in bitcoin amount widget (for example, for sending) using a combobox 2011-07-26 13:08:34 +02:00
Wladimir J. van der Laan
ca1dbe10ed Negative transaction color changed to red (was grey due to mistake) 2011-07-26 09:16:50 +02:00
JoelKatz
67ed7d9d49 Fix UNIX-specific thread handle leak. 2011-07-25 15:06:45 -07:00
Wladimir J. van der Laan
e780b94bd3 fix unit names (μBTC) 2011-07-25 22:28:12 +02:00
Wladimir J. van der Laan
e285ffcd05 preparations for multiple unit (uBTC, mBTC, BTC) support, fix amount entry issue 2011-07-25 21:38:54 +02:00
Wladimir J. van der Laan
bbae0fc9ef put color constants in guiconstants.h 2011-07-25 18:39:52 +02:00
Jeff Garzik
a9ba47101a Merge pull request #403 from sipa/cbitcoinaddress
keys indexed by address + introduced CBitcoinaddress
2011-07-24 15:38:38 -07:00
Wladimir J. van der Laan
daa1a7398f better exit icon 2011-07-24 19:09:29 +02:00
Wladimir J. van der Laan
f5472574a7 make all tab icons blue/gray for more consistencyx 2011-07-24 18:32:21 +02:00
Wladimir J. van der Laan
591dcaf681 improve tooltip texts 2011-07-24 18:06:07 +02:00
Pieter Wuille
a7dd11c6da Fix for small change outputs
With the separation of CENT and MIN_TX_FEE, it is now reasonable
to create change outputs between 0.01 and 0.0005, as these are
spendable according to the policy, even though they require a fee
to be paid.

Also, when enough fee was already present, everything can go into
a change output, without further increasing the fee.
2011-07-24 16:37:09 +02:00
Wladimir J. van der Laan
8a13456f3a add windows program (.exe) icon 2011-07-24 15:53:27 +02:00
Wladimir J. van der Laan
1a925b8e60 Merge pull request #9 from celil-kj/master
allow decimals such as .05 for amount of bitcoins to send
2011-07-24 02:41:19 +02:00
Celil
2eac3a6dec Allow ammount field to be empty so that one can specify .05 instead of
having to type the leading zero as in 0.05
2011-07-22 16:55:50 -07:00
Wladimir J. van der Laan
7beada58cd Merge branch 'master' of https://github.com/bitcoin/bitcoin 2011-07-22 21:41:24 +02:00
Wladimir J. van der Laan
8b936b617f Implement range... transaction filter 2011-07-22 18:30:25 +02:00
Wladimir J. van der Laan
73cd5e5212 fix clear() (clear red/invalid status) 2011-07-22 17:06:37 +02:00
Matt Corallo
643160f6e7 Actually use mapAlreadyAskedFor.
Previously, mapAlreadyAskedFor was read from, but never added to.
The original intent was to use mapAlreadyAskedFor to keep track
of the time an item was requested and "Each retry is 2 minutes
after the last".
This implements that intent.
2011-07-21 22:06:20 +02:00
Wladimir J. van der Laan
174b3eddc0 one remove/delete icon is enough and the red minus better matches the add icon 2011-07-18 21:02:17 +02:00
Wladimir J. van der Laan
8ea1c9a418 Merge branch 'notebook' 2011-07-18 18:50:35 +02:00
Wladimir J. van der Laan
68e327ae7b move buttons to bottom of send coins tab, outside of scroll area 2011-07-18 18:39:49 +02:00
Wladimir J. van der Laan
24c835b0b6 windows build fix 2011-07-18 18:34:53 +02:00
Abraham Jewowich
03f8b54565 Fix bug with accessing vchData[0] when vchData is empty.
Fix typo in CBase58Data::CompareTo
2011-07-18 06:26:54 -07:00
Wladimir J. van der Laan
a75e1e3292 Fix "Last received block was generated Up to date" 2011-07-18 06:55:05 +02:00
Wladimir J. van der Laan
1907b96d69 put sendcoins entries in scroll area, so that window does not become bigger than screen with many recipients 2011-07-17 17:42:41 +02:00
Wladimir J. van der Laan
8dcffd4d07 show rotating spinner when block download out of date, tick otherwise 2011-07-17 17:31:37 +02:00
Wladimir J. van der Laan
5df0b03c95 make initial block download reporting somewhat better by tracking version responses 2011-07-17 14:17:13 +02:00
Pieter Wuille
cb61b8dc4c split off CBase58Data from CBitcoinAddress
Split off features unrelated to addresses from CBitcoinAddress to
CBase58Data, so they can be reused.
2011-07-17 12:09:17 +02:00
Pieter Wuille
2ffba736e9 Use CBitcoinAddress instead of string/uint160
Instead of conversion functions between pubkey/uint160/address in
base58.h, have a fully fledged class CBitcoinAddress (CAddress was
already taken) to represent addresses.
2011-07-17 12:09:14 +02:00
Pieter Wuille
03fbd79049 get rid of mapPubKeys
Make CKeyStore's interface work on uint160's instead of pubkeys, so
no separate global mapPubKeys is necessary anymore.
2011-07-17 12:07:59 +02:00
Wladimir J. van der Laan
9b9cd3dd20 add missing icon 2011-07-16 19:35:41 +02:00
Wladimir J. van der Laan
9958e09dbc Revert "Now that send coins / receive coins etc are tabs, remove them from menu, and reorganize menu bar"
This reverts commit ea37fb9187.
2011-07-16 19:28:15 +02:00
Wladimir J. van der Laan
a5e6d72339 add sendmany support 2011-07-16 19:25:02 +02:00
Eric Hosmer
88cab1e4a3 Added crypter to makefile.vc. 2011-07-15 23:38:46 -04:00
Wladimir J. van der Laan
d421117620 Merge branch 'master' of https://github.com/bitcoin/bitcoin 2011-07-15 16:42:44 +02:00
Wladimir J. van der Laan
19366be186 Merge remote-tracking branch 'satoshi/qtui'
Conflicts (resolved by copying files from remote branch):
	.gitignore
	src/cryptopp/cpu.cpp
	src/cryptopp/cpu.h
	src/cryptopp/cryptlib.h
	src/cryptopp/iterhash.h
	src/cryptopp/misc.h
	src/cryptopp/secblock.h
	src/cryptopp/sha.cpp
	src/cryptopp/sha.h
	src/cryptopp/smartptr.h
	src/json/json_spirit_reader.cpp
	src/json/json_spirit_value.cpp
	src/json/json_spirit_writer.cpp
2011-07-15 15:12:17 +02:00
Wladimir J. van der Laan
a35ee96336 Add call to request unconfirmed balance 2011-07-15 15:09:49 +02:00
Wladimir J. van der Laan
ea37fb9187 Now that send coins / receive coins etc are tabs, remove them from menu, and reorganize menu bar 2011-07-15 14:55:21 +02:00
Celil
608810a3e7 Fix error when export is cancelled without specifying a filename. 2011-07-14 17:11:11 -07:00
Wladimir J. van der Laan
77b615ceba solve warnings at startup 2011-07-14 21:21:17 +02:00
Matt Corallo
3a10d1c493 Fix bad return values in LoadWallet. 2011-07-14 18:15:50 +02:00
Pieter Wuille
24271c542b Merge pull request #412 from sgimenez/db-transactions
Single DB transactions
2011-07-14 05:29:09 -07:00
Stéphane Gimenez
d655a26c9d Single DB transaction for addresses from DNS seeds 2011-07-14 03:50:06 +02:00
Matt Corallo
a2606bad09 Fix Build in GetReservedKey() in wallet.cpp 2011-07-14 03:34:07 +02:00
Patrick Varilly
8c41469140 Single DB transaction for all addresses in a message
Cuts disk activity at startup immensely
2011-07-14 03:29:07 +02:00
Matt Corallo
cee69980b0 Generate Warning when using default key. 2011-07-14 03:28:31 +02:00
Matt Corallo
0d7b28e52e Fix crashes when a wallet is locked and GetReservedKey() is called 2011-07-14 03:11:40 +02:00
Jeff Garzik
9cd22ab862 Merge pull request #406 from muggenhor/warning-fixes
Warning fixes
2011-07-13 08:55:49 -07:00
Jeff Garzik
b8cbbc2c28 Merge pull request #405 from sipa/syncdefault
Bugfix: add autogenerated addresses to address book
2011-07-13 08:53:57 -07:00
Giel van Schijndel
84c3c2ebe7 fix warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 14:25:45 +02:00
Giel van Schijndel
93752b8a39 fix warning: variable ‘nMinDepth’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 13:43:24 +02:00
Matt Corallo
d5e9d0000d Fix makefile.linux-mingw 2011-07-13 13:12:49 +02:00
Pieter Wuille
d5115a71a1 Bugfix: add autogenerated addresses to address book 2011-07-13 13:05:08 +02:00
Jeff Garzik
24a0def8cd Bump version to 0.3.25
Yes, we might release as v0.4, but let's just do a simple increment
for now.
2011-07-13 01:19:26 -04:00
Jeff Garzik
116df55e21 Update CWallet::LoadWallet for proper return type. 2011-07-13 01:07:49 -04:00
Giel van Schijndel
d0538a81bb fix warning: unused function 'SigIllHandlerSSE2' [-Wunused-function]
Only declare & define SigIllHandlerSSE2 when its used.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:10:15 +02:00
Giel van Schijndel
858cebed7d fix warning: unused variable 'X' [-Wunused-variable]
Remove several unused variables.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:10:15 +02:00
Giel van Schijndel
225f222c9f fix warning: X enumeration values not handled in switch [-Wswitch-enum]
Add default cases to opcode switches to assert that they should never
occur.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:10:15 +02:00
Giel van Schijndel
d7f1d200ab fix warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
Don't check for a negative parameter count, because not only will it
never happen, it doesn't make any sense either.

Invalid sockets (as returned by socket(2)) are always exactly -1 (not
just negative as negative file descriptors are technically not
prohibited by POSIX) on POSIX systems.  Since we store them in SOCKET
(unsigned int), however, that really is ~0U (or MAX_UINT) which happens
to be what INVALID_SOCKET is already defined to, so an additional check
for being negative is not only unnecessary (unsigned integers aren't
*ever* negative) its redundant as well (the INVALID_SOCKET comparison is
enough).

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:07:44 +02:00
Giel van Schijndel
f85c097449 fix warnings: using the result of an assignment as a condition without parentheses [-Wparentheses]
Don't unnecessarily assign to variables within the *boolean* expression
of a conditional.

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:07:44 +02:00
Giel van Schijndel
ecf1c79aad fix warnings: expression result unused [-Wunused-value]
In the assert()s take advantage of the fact that string constants
("string") are effectively of type 'const char []', which when used in
an expression yield a non-NULL pointer.

An assertion that should always fail can thus be formulated as:
  assert(!"fail);

An assertion where a text message should be added to the expression can
be written as such:
  assert("message" && expression);

Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:07:44 +02:00
Giel van Schijndel
df40181417 fix warning on 64bit systems: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2011-07-13 05:07:44 +02:00
Matt Corallo
0ca8324f59 Update makefile.linux-mingw to work with crypter and UPnP fix. 2011-07-12 22:44:00 -04:00
Jeff Garzik
0fa89d8e81 Merge pull request #381 from TheBlueMatt/nminversion
Add minversion to wallet.
2011-07-12 19:34:30 -07:00
Jeff Garzik
0bad8e4237 Merge pull request #352 from TheBlueMatt/newenc
Wallet Private Key Encryption (on CWallet)
2011-07-12 19:10:12 -07:00
Matt Corallo
7414733bea Make an invalid addrIncoming so that old clients crash.
This prevents old clients from opening, and thus corrupting
or otherwise causing harm to encrypted wallets.
2011-07-13 02:11:25 +02:00
Matt Corallo
96f34cd5c4 Use DB Transactions when encrypting wallet.
This speeds up the encryption process significantly.
2011-07-13 02:11:25 +02:00
Pieter Wuille
0efda1a79e Do not use obsolete CPrivKey for passing keys around 2011-07-13 02:11:25 +02:00
Matt Corallo
fbeb5fb483 Add the walletlock RPC method to lock the wallet manually. 2011-07-13 02:11:25 +02:00
Matt Corallo
81598083e7 Dynamically remove/insert the Options for encryption in the menus. 2011-07-13 02:11:25 +02:00
Matt Corallo
98545d2cdf Push unlocked_until in getinfo. 2011-07-13 02:11:25 +02:00
Matt Corallo
ddebdd9a8f Set the number of SHA512 rounds based on the speed of the computer. 2011-07-13 02:11:25 +02:00
Matt Corallo
4e87d341f7 Add wallet privkey encryption.
This commit adds support for ckeys, or enCrypted private keys, to the wallet.
All keys are stored in memory in their encrypted form and thus the passphrase
is required from the user to spend coins, or to create new addresses.

Keys are encrypted with AES-256-CBC using OpenSSL's EVP library. The key is
calculated via EVP_BytesToKey using SHA512 with (by default) 25000 rounds and
a random salt.

By default, the user's wallet remains unencrypted until they call the RPC
command encryptwallet <passphrase> or, from the GUI menu, Options->
Encrypt Wallet.

When the user is attempting to call RPC functions which require the password
to unlock the wallet, an error will be returned unless they call
walletpassphrase <passphrase> <time to keep key in memory> first.

A keypoolrefill command has been added which tops up the users keypool
(requiring the passphrase via walletpassphrase first).
keypoolsize has been added to the output of getinfo to show the user the
number of keys left before they need to specify their passphrase (and call
keypoolrefill).

Note that walletpassphrase will automatically fill keypool in a separate
thread which it spawns when the passphrase is set. This could cause some
delays in other threads waiting for locks on the wallet passphrase, including
one which could cause the passphrase to be stored longer than expected,
however it will not allow the passphrase to be used longer than expected as
ThreadCleanWalletPassphrase will attempt to get a lock on the key as soon
as the specified lock time has arrived.

When the keypool runs out (and wallet is locked) GetOrReuseKeyFromPool
returns vchDefaultKey, meaning miners may start to generate many blocks to
vchDefaultKey instead of a new key each time.

A walletpassphrasechange <oldpassphrase> <newpassphrase> has been added to
allow the user to change their password via RPC.

Whenever keying material (unencrypted private keys, the user's passphrase,
the wallet's AES key) is stored unencrypted in memory, any reasonable attempt
is made to mlock/VirtualLock that memory before storing the keying material.
This is not true in several (commented) cases where mlock/VirtualLocking the
memory is not possible.

Although encryption of private keys in memory can be very useful on desktop
systems (as some small amount of protection against stupid viruses), on an
RPC server, the password is entered fairly insecurely. Thus, the only main
advantage encryption has for RPC servers is for RPC servers that do not spend
coins, except in rare cases, eg. a webserver of a merchant which only receives
payment except for cases of manual intervention.

Thanks to jgarzik for the original patch and sipa, gmaxwell and many others
for all their input.

Conflicts:

	src/wallet.cpp
2011-07-13 02:11:25 +02:00
Wladimir J. van der Laan
4a843976e0 also show balloon on sent transaction, to notify when coins sent 2011-07-11 21:01:53 +02:00