Commit graph

36 commits

Author SHA1 Message Date
MarcoFalke faf93f37fe [trivial] Reuse translation and cleanup DEFAULT_* values
* DEFAULT_DISABLE_SAFEMODE = false
* Use DEFAULT_* constants for extern bools
2015-11-28 19:01:11 +01:00
Luke Dashjr b966aa836a Constrain constant values to a single location in code 2015-11-28 18:47:29 +01:00
Luke Dashjr 3e7c89196c Optimisation: Store transaction list order in memory rather than compute it every need
Huge performance improvement (450%) for zapwallettxes
2015-11-21 01:48:25 +00:00
Wladimir J. van der Laan 3694b74fa9
Merge pull request #6887
53238ff Clarify what minrelaytxfee does (MarcoFalke)
abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
2015-11-05 12:11:11 +01:00
Wladimir J. van der Laan 8a95a18562
Merge pull request #6669
6342a48 Init: Use DEFAULT_TRANSACTION_MINFEE in help message (MarcoFalke)
a9c73a1 [wallet] Add comments for doxygen (MarcoFalke)
6b0e622 [wallet] Refactor to use new MIN_CHANGE (MarcoFalke)
2015-11-04 12:30:50 +01:00
MarcoFalke abd8b768ee [qt] Properly display required fee instead of minTxFee 2015-11-03 08:53:37 +01:00
MarcoFalke a9c73a130e [wallet] Add comments for doxygen 2015-10-28 11:15:48 +01:00
MarcoFalke 6b0e622c25 [wallet] Refactor to use new MIN_CHANGE
* Introduce new constant MIN_CHANGE and use it instead of the
hardcoded "CENT"
* Add test case for MIN_CHANGE
* Introduce new constant for -mintxfee default:
  DEFAULT_TRANSACTION_MINFEE = 1000
2015-10-28 10:52:46 +01:00
Pieter Wuille 391dff16fe Do not store Merkle branches in the wallet.
Assume that when a wallet transaction has a valid block hash and transaction position
in it, the transaction is actually there. We're already trusting wallet data in a
much more fundamental way anyway.

To prevent backward compatibility issues, a new record is used for storing the
block locator in the wallet. Old wallets will see a wallet file synchronized up
to the genesis block, and rescan automatically.
2015-09-22 18:51:07 +02:00
Wladimir J. van der Laan ddd8d80c63
Merge pull request #6415
d042854 SQUASH "Implement watchonly support in fundrawtransaction" (Matt Corallo)
428a898 SQUASH "Add have-pubkey distinction to ISMINE flags" (Matt Corallo)
6bdb474 Implement watchonly support in fundrawtransaction (Matt Corallo)
f5813bd Add logic to track pubkeys as watch-only, not just scripts (Matt Corallo)
d3354c5 Add have-pubkey distinction to ISMINE flags (Matt Corallo)
5c17059 Update importaddress help to push its use to script-only (Matt Corallo)
a1d7df3 Add importpubkey method to import a watch-only pubkey (Matt Corallo)
907a425 Add p2sh option to importaddress to import redeemScripts (Matt Corallo)
983d2d9 Split up importaddress into helper functions (Matt Corallo)
cfc3dd3 Also remove pay-2-pubkey from watch when adding a priv key (Matt Corallo)
2015-08-14 16:28:37 +02:00
Jorge Timón 60c8bac77c Includes: Cleanup around net main and wallet
-Move from .h to .cpp: in main, net and wallet
-Remove unnecessary #include "main.h"
-Cleanup some wallet files includes
2015-07-23 21:10:26 +02:00
Jorge Timón 9dd793f499 TRIVIAL: Missing includes 2015-07-23 21:10:22 +02:00
Matt Corallo 6bdb474dc9 Implement watchonly support in fundrawtransaction
Some code and test cases stolen from
Bryan Bishop <bryan@ledgerx.com> (pull #5524).
2015-07-20 16:01:38 -07:00
Wladimir J. van der Laan 5a7304b69d Move recently introduced CTransAction::IsEquivalentTo to CWalletTx
CTransAction::IsEquivalentTo was introduced in #5881.
This functionality is only useful to the wallet, and should never have
been added to the primitive transaction type.
2015-07-02 20:57:39 +02:00
Jonas Schnelli a7b9623d18 miner: rename UpdateRequestCount signal to ResetRequestCount 2015-07-01 16:09:58 +02:00
Jonas Schnelli 5496253966 add CReserveScript to allow modular script keeping/returning
- use one CReserveScript per mining thread
2015-07-01 16:06:14 +02:00
Jonas Schnelli d0fc10a844 detach wallet from miner 2015-06-30 21:45:46 +02:00
Matt Corallo 1e0d1a2ff0 Add FundTransaction method to wallet
Some code stolen from Jonas Schnelli <jonas.schnelli@include7.ch>
2015-06-11 01:03:23 -07:00
Wladimir J. van der Laan 12cdbabc26
Merge pull request #6152
08d9373 Remove unused code from wallet and validation interface (Michael Ford)
2015-06-05 21:24:15 +02:00
Philip Kaufmann a9ac95c1bc use const references where appropriate 2015-06-04 19:34:18 +02:00
Michael Ford 08d9373e2f Remove unused code from wallet and validation interface
Fixes #6109
2015-05-18 17:11:06 +08:00
Alex Morcos 2457dc43ac Change default nTxConfirmTarget to 2 2015-05-18 09:01:30 +02:00
Wladimir J. van der Laan 77ed59df4d wallet: Introduce constant for -txconfirmtarget default 2015-05-18 09:00:24 +02:00
Gregory Maxwell 219953ce50 Show zero value txouts in listunspent.
It's reasonable that automatic coin selection will not pick a zero
 value txout, but they're actually  spendable; and you should know
 if you have them. Listing also makes them available to tools like
 dust-b-gone.
2015-04-20 10:13:18 -07:00
Philip Kaufmann a21df62069 ensure consistent header comment naming conventions
- BITCOIN_FOLDER_SUBFOLDER_FILENAME_H
2015-04-20 13:29:22 +02:00
Wladimir J. van der Laan 6f252627b2 wallet: make it possible to disable transaction broadcast
This is an advanced feature which will disable any kind of automatic
transaction broadcasting in the wallet. This gives the user full control
of how the transaction is sent.

For example they can broadcast new transactions through some other
mechanism themselves, after getting the transaction hex through `gettransaction`.

This just adds the option `-walletbroadcast=<0,1>`. Right now these
transactions will get the status

    Status: conflicted, has not been successfully broadcast yet

They shouldn't be shown as conflicted at all (`walletconflicts` is empty). This status
will go away when the transaction is received through the network.
2015-04-01 13:03:39 +02:00
Gavin Andresen 0f5954c434
Regression test for ResendWalletTransactions
Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions."

I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived).

I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by:

1. Running bitcoind -connect=0.0.0.0:8333
2. Creating a couple of send-to-self transactions
3. Connect to a peer using -addnode
4. Waited a while, monitoring debug.log, until I see:
```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions```

One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
2015-03-24 15:29:20 -04:00
Jorge Timón 8a893c949b Includes: Do not include main.h from any other header 2015-03-24 17:23:32 +01:00
Jorge Timón eca0b1ea62 Includes: MOVEONLY: move more method definitions out of wallet.h 2015-03-24 17:21:45 +01:00
Jorge Timón 26c16d9de9 Includes: Refactor: Move CValidationInterface and CMainSignals out of main 2015-03-24 17:21:41 +01:00
Pieter Wuille 45d6d0bce5
Merge pull request #5933
341e238 use constant references for strings in functions in wallet/*.* (Philip Kaufmann)
2015-03-24 05:33:31 -07:00
Cory Fields a354a59f1f wallet: move crypter to wallet 2015-03-22 15:18:55 -04:00
Philip Kaufmann 341e2385d5 use constant references for strings in functions in wallet/*.* 2015-03-21 18:40:51 +01:00
Jonas Schnelli 2bb1c87700 refactor: move bdb (bitdb) interaction from init.cpp to wallet.cpp
this will remove db.h from init.cpp
2015-03-20 16:23:39 +01:00
Wladimir J. van der Laan 05f17d4eaa
Merge pull request #5745
50c72f2 [Move Only] Move wallet related things to src/wallet/ (Jonas Schnelli)
2015-03-20 16:08:35 +01:00
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
Renamed from src/wallet.h (Browse further)