Commit graph

340 commits

Author SHA1 Message Date
Jonas Schnelli 50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00
Cory Fields bbacd88204 c++11: MOVEONLY: move function definitions out of the header
These need to be moved out of the header in order to resolve a circular
dependency between CWallet and CTxWallet. See next commit.
2015-02-03 22:41:33 -05:00
Wladimir J. van der Laan e5f1f5a263
Merge pull request #5732
1371e6f Change "insane" to "absurd" (referring to high fees) in text strings and identifiers. (Daira Hopwood)
2015-02-03 13:12:12 +01:00
Wladimir J. van der Laan 4e2b1fff98
Merge pull request #5675
2d9b0b7 Fix priority calculation in CreateTransaction (Alex Morcos)
2015-02-03 10:36:01 +01:00
Daira Hopwood 1371e6f5db Change "insane" to "absurd" (referring to high fees) in text strings and identifiers.
Note that this will also require translation changes in Transifex for the key
"A fee higher than %1 is considered an insanely high fee." which is now
"A fee higher than %1 is considered an absurdly high fee."

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-31 23:23:20 +00:00
Pavel Janík 5262fde0ec Remove whitespaces before double colon in errors and logs 2015-01-31 17:38:28 -05:00
Wladimir J. van der Laan 8204e19abe
Merge pull request #4805
44bc988 [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) (Cozz Lovan)
2015-01-26 12:19:12 +01:00
Alex Morcos 2d9b0b7f03 Fix priority calculation in CreateTransaction
Make this projection of priority in 1 block match the calculation in the low priority reject code.
2015-01-16 12:17:57 -05:00
Wladimir J. van der Laan 4f1524966a Replace direct use of 0 with SetNull and IsNull
Replace x=0 with .SetNull(),
x==0 with IsNull(), x!=0 with !IsNull().
Replace uses of uint256(0) with uint256().
2015-01-05 15:45:34 +01:00
Pieter Wuille 9a5cabf3da
Merge pull request #5508
146c0a7 Add RandAddSeedPerfmon to MakeNewKey (21E14)
2015-01-04 16:37:24 +01:00
Wladimir J. van der Laan d01bcc446e
Merge pull request #5485
aa279d6 Enforce minRelayTxFee on wallet created tx and add a maxtxfee option. (Gregory Maxwell)
2014-12-23 12:12:05 +01:00
Gregory Maxwell aa279d6131 Enforce minRelayTxFee on wallet created tx and add a maxtxfee option.
Previously the minRelayTxFee was only enforced on user specified values.

It was possible for smartfee to produce a fee below minRelayTxFee which
 would just result in the transaction getting stuck because it can't be
 relayed.

This also introduces a maxtxfee option which sets an absolute maximum
 for any fee created by the wallet, with an intention of increasing
 user confidence that the automatic fees won't burn them. This was
 frequently a concern even before smartfees.

If the configured fee policy won't even allow the wallet to meet the relay
 fee the transaction creation may be aborted.
2014-12-19 12:05:10 -08:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Wladimir J. van der Laan 811c71d287
Merge pull request #2340
ba7fcc8 Discourage fee sniping with nLockTime (Peter Todd)
2014-12-19 18:54:51 +01:00
21E14 146c0a7c5a Add RandAddSeedPerfmon to MakeNewKey 2014-12-18 20:25:04 -05:00
Pavel Janík b93173dee9 Move SendMoney() to rpcwallet.cpp. 2014-12-02 08:32:10 +01:00
Cozz Lovan 43422a0121 [Qt] Fix wallet-lock in CWallet::GetAccountAddresses(..) 2014-11-29 12:51:36 +01:00
Wladimir J. van der Laan 124b4895b8
Merge pull request #5209
9b1627d [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis (Cozz Lovan)
2014-11-26 10:58:20 +01:00
Pieter Wuille d0c41a7350 Add sanity check after key generation
Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
2014-11-23 10:47:39 +01:00
Cozz Lovan c1c9d5b415 [Qt] Add Smartfee to GUI 2014-11-19 16:04:53 +01:00
Cozz Lovan e7876b2979 [Wallet] Prevent user from paying a non-sense fee 2014-11-19 16:04:53 +01:00
Cozz Lovan ed3e5e468c [Wallet] Add global boolean whether to pay at least the custom fee (default=true) 2014-11-19 16:04:53 +01:00
Cozz Lovan 0ed9675be4 [Wallet] Add global boolean whether to send free transactions (default=true) 2014-11-19 16:04:53 +01:00
Wladimir J. van der Laan 65e3a1e762
Make sure that GetRandomBytes never fails
We're using GetRandomBytes in several contexts where it's either
unwieldy to return an error, or an error would mean a fatal exception
anyhow.

@gmaxwell checked OpenSSL a while ago and discovered that it never
actually fails, but it can't hurt to be a bit paranoid here.
2014-11-07 13:49:25 +01:00
Cozz Lovan 9b1627d13e [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis 2014-11-04 22:29:40 +01:00
Michael Ford 5b40d88688 Update comments in wallet to be doxygen compatible 2014-10-28 11:47:49 +08:00
Daniel Kraft a31e8bad53 Make CBlockIndex* returned by GetDepthInMainChain const.
Make the CBlockIndex* (optionally) returned by GetDepthInMainChain
const.  This prevents accidental modification.  The result is for
reading its properties rather than modifying it.
2014-10-24 16:13:41 +02:00
Cory Fields 066e2a1403 script: move CScriptID to standard.h and add a ctor for creating them from CScripts
This allows for a reversal of the current behavior.

This:
CScript foo;
CScriptID bar(foo.GetID());

Becomes:
CScript foo;
CScriptID bar(foo);

This way, CScript is no longer dependent on CScriptID or Hash();
2014-10-17 13:44:14 -04:00
Peter Todd ba7fcc8de0
Discourage fee sniping with nLockTime 2014-10-13 08:18:06 -04:00
Wladimir J. van der Laan d7e1950483
Merge pull request #4937
ccca27a [Wallet] Watch-only fixes (Cozz Lovan)
2014-10-13 13:57:07 +02:00
Pieter Wuille dec58922d0
Merge pull request #4996
d0c4197 change exit(1) to an assert in CWallet::EncryptWallet (Philip Kaufmann)
870da77 fix possible memory leaks in CWallet::EncryptWallet (Philip Kaufmann)
f606bb9 fix a possible memory leak in CWalletDB::Recover (Philip Kaufmann)
2014-10-08 15:51:32 -07:00
Cozz Lovan 44bc988e7b [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) 2014-10-03 05:11:27 +02:00
Cozz Lovan ccca27a788 [Wallet] Watch-only fixes 2014-10-03 04:29:51 +02:00
Philip Kaufmann d0c4197ef6 change exit(1) to an assert in CWallet::EncryptWallet 2014-10-01 08:50:24 +02:00
Philip Kaufmann 870da77da6 fix possible memory leaks in CWallet::EncryptWallet
- add missing deletes for pwalletdbEncryption
- add an assert before trying to reserve memory for pwalletdbEncryption
- add a destructor to CWallet, which ensures deletion of
  pwalletdbEncryption on object destruction
2014-10-01 08:48:23 +02:00
Mark Friedenbach a372168e77 Use a typedef for monetary values 2014-09-26 15:42:04 -07:00
Wladimir J. van der Laan 3cdae61aa2
Merge pull request #4787
4b0deb3 Clean up CMerkleTx::SetMerkleBranch. (Daniel Kraft)
2014-09-22 14:18:54 +02:00
Pieter Wuille 0be990ba34 Move CTxDestination from script/script to script/standard 2014-09-16 19:14:32 +02:00
Pieter Wuille dc54e9db98
Merge pull request #4825
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
2014-09-16 04:47:55 +02:00
jtimon 8b59a3d366 Move CAffectedKeysVisitor to wallet.cpp (remove ExtractAffectedKeys) 2014-09-10 12:44:43 +02:00
Pieter Wuille 1575c5171f
Merge pull request #4868
2c2cc5d Remove some unnecessary c_strs() in logging and the GUI (Philip Kaufmann)
f7d0a86 netbase: Use .data() instead of .c_str() on binary string (Wladimir J. van der Laan)
2014-09-09 16:43:06 +02:00
Philip Kaufmann 2c2cc5dac1
Remove some unnecessary c_strs() in logging and the GUI
Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code`
by P. Kaufmann.
2014-09-09 11:31:17 +02:00
jtimon e088d65acb Separate script/sign 2014-09-08 20:21:35 +02:00
ENikS 8d657a6517 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' 2014-09-06 15:59:59 -04:00
Pieter Wuille 145d5be896 Introduce BlockMap type for mapBlockIndex 2014-09-04 02:04:51 +02:00
Daniel Kraft 4b0deb3b2d Clean up CMerkleTx::SetMerkleBranch.
The case SetMerkleBranch(NULL) was never actually used, and thus the
involved code (loading the block from disk) can be removed and the
implementation simplified.
2014-08-30 18:00:55 +02:00
Wladimir J. van der Laan 0101483f46
Move CMerkleTx to wallet.cpp/h
It is only used by the wallet so it has no place in main.
2014-08-29 17:26:01 +02:00
Wladimir J. van der Laan d49b0876a4
Merge pull request #4673
1c5f0af [Qt] Add column Watch-only to transactions list (Cozz Lovan)
939ed97 Add boolean HaveWatchonly and signal NotifyWatchonlyChanged (Cozz Lovan)
2014-08-26 17:41:33 +02:00
Wladimir J. van der Laan ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Wladimir J. van der Laan af8297c010 Move functions in wallet.h to implementation file
Breaks compile-time dependency of wallet.h on util.
2014-08-26 13:25:21 +02:00