Commit graph

3121 commits

Author SHA1 Message Date
Philip Kaufmann d127964a97 walletview: clarify 2 comments 2013-10-27 21:20:49 +01:00
Philip Kaufmann 0259c62f41 walletview: make backupWallet() use GUIUtil::getSaveFileName()
- this allows removal of several Qt headers and makes use of a
  standardized function in GUIUtil
- adds selected path to the UI output
2013-10-27 21:20:47 +01:00
Wladimir J. van der Laan aa5822f9c3 Merge pull request #3158 from Diapolo/guiutil
GUIUtil: make getSaveFileName() use native OS path separators
2013-10-27 03:35:30 -07:00
Wladimir J. van der Laan 9705c5b9ae qt: english language update 2013-10-27 09:09:44 +01:00
Wladimir J. van der Laan 9a45a823f8 Merge pull request #3150 from Diapolo/misc
[Qt] additional small fixes for #3099 (new receive flow)
2013-10-27 01:08:25 -07:00
Wladimir J. van der Laan ff7a834f6b Merge pull request #3151 from laanwj/2013_10_walletview
qt: clean up signal handling in walletframe/walletview
2013-10-27 01:03:02 -07:00
Wladimir J. van der Laan 7d16bb3874 qt: clean up signal handling in walletframe/walletview
Use proper signals everywhere.
Removes the need to store a pointer to the BitcoinGUI object in
the walletview.
Also removes the interdependence between setWalletModel / setBitcoinGUI.
2013-10-27 08:45:54 +01:00
Matt Corallo b33b9a6fef Fix comparison tool by asking for blocks more aggressively 2013-10-27 02:23:36 -04:00
Philip Kaufmann 4751df0ca3 [Qt] additional small fixes for #3099 (new receive flow)
- remove 2 unneeded windowTitle attributes, which bloat our translations
- cleanup some unneeded .cpp/.h includes and class usages
- use a more generic string for clearing sendcoinsdialog and
  requestpaymentdialog
- edit 2 strings in BitcoinGUI and replace "edit" with "show" as this
  seems more clear in the context where it is used
2013-10-26 21:31:53 +02:00
Pieter Wuille e9755001ab Remove redundant insert method in serialize.
This seems to cause problems on recent clang, and looks totally
redundant and unused.

The const_iterator version is identical to the vector::const_iterator
one (which is a typedef thereof). Marking it private (instead of
removing) compiles fine, so this version is effectively unused even.
2013-10-26 20:34:48 +02:00
Philip Kaufmann 444fd65f66 GUIUtil: make getSaveFileName() use native OS path separators 2013-10-26 19:05:37 +02:00
Pieter Wuille 722fa283d0 Break dependency of init on wallet.
This required some code movement (what was CWalletTx::AcceptToMemoryPool
doing in main?), and adding a few explicit includes that used to be
implicit through init.h.
2013-10-26 14:51:47 +02:00
Pieter Wuille 00588c3fac Use boost signals for callbacks from main to wallet 2013-10-26 14:51:46 +02:00
Pieter Wuille e010af7089 Remove broken PrintWallet functionality 2013-10-26 14:49:47 +02:00
Pieter Wuille fe52346450 Do not treat fFromMe transaction differently when broadcasting 2013-10-26 14:49:47 +02:00
Pieter Wuille a616206865 Give peer time-adjustment data an own lock
Instead of relying on cs_main (defined in a different module) to
prevent concurrent access to it.
2013-10-26 14:43:26 +02:00
Warren Togami 1ce418929a Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
INIT_PROTO_VERSION is the initial version, after a succesful version/verack it is increased to a negotiated version.
MIN_PEER_PROTO_VERSION could be a different value to disconnect from peers older than a specified version.
2013-10-25 23:46:37 -10:00
Gavin Andresen 1f3d3647ff Send multiple inv messages if mempool.size > MAX_INV_SZ
Changes the response to the 'mempool' command so that if
the memory pool has more than MAX_INV_SZ transactions (50,000)
it will respond with multiple 'inv' messages.
2013-10-26 14:14:31 +10:00
Wladimir J. van der Laan 0d09b3e8b0 Merge pull request #3144 from Diapolo/message_sendcoinsdialog
allow emit message() in sendcoinsdialog and walletview
2013-10-25 06:43:19 -07:00
Wladimir J. van der Laan 3b70282015 qt: ReceiveCoinsDialog and SendCoinsDialog should not take a gui object
They're supposed to be children of the walletview, and are added with
addWidget later on.
Inconsequential change because the object passed was already 0.
2013-10-25 15:11:55 +02:00
Philip Kaufmann 1511057b4f [Qt] additional small fix for #3099 (new receive flow)
- remove an obsolete connection to a signMessage() signal
2013-10-25 14:44:04 +02:00
Philip Kaufmann d57a496c51 [Qt] misc small fixes for #3099 (new receive flow)
- changes some strings that were forgotton or made no sense in the conext
  they are used
- remove an orphan file from the qt project file
- revert a small change in signverifymessagedialog.ui
- guard #include "bitcoin-config.h" with #if defined(HAVE_CONFIG_H)
- remove windowTitle from addressbookpage.ui
2013-10-25 14:28:34 +02:00
Philip Kaufmann 2384a2864b allow emit message() in sendcoinsdialog and walletview
- this allows us to use emit message() over MessageBox:: or gui->message()
  calls in sendcoinsdialog and walletview
- move main handlePaymentRequest() functionality back to BitcoinGUI
- move a showNormalIfMinimized() before gotoSendCoinsPage()
2013-10-25 14:24:30 +02:00
Wladimir J. van der Laan 081c0cdeb2 Merge pull request #3099 from laanwj/2013_10_new_receive_flow
qt: improve "receive coins" workflow
2013-10-25 04:27:05 -07:00
Wladimir J. van der Laan 70b14636cd qt: general polish after adding new receive flow
- We no longer have an address book, but "address lists", update message
  accordingly
- Add tooltips here and there
- Clarify text on buttons
- add Copy Address button to receive request dialog
2013-10-25 13:25:25 +02:00
Wladimir J. van der Laan 48cc4fc326 Merge pull request #3130 from Diapolo/paymentACK_via_message
Qt: move paymentACK handling to paymentserver
2013-10-25 03:26:36 -07:00
Philip Kaufmann 9195e0bed2 paymentserver: init all class members in constructor 2013-10-24 16:16:39 +02:00
Philip Kaufmann 08dd1b7be1 Qt: move paymentACK handling to paymentserver
- add new slot handlePaymentACK() to paymentserver, which handles
  paymentACK messages (currently we just display them)
- make paymentACK message a modal information dialog
- change some QObject::tr() to just tr()
- clarify the processPaymentRequest() error, when IsDust()
- small string change to prevent a tripple + usage with QString
2013-10-24 15:43:55 +02:00
Peter Todd 005609539b
Show short scriptPubKeys correctly
Previously bitcoin-qt's -debug transaction info was showing CTxOut([error])

It is valid for a scriptPubKey to be any size, for example simply
OP_RETURN is valid and can be used to destroy a TXOUT to mining fees.
2013-10-24 04:52:16 -04:00
Peter Todd 22de68dffc
Relay OP_RETURN TxOut as standard transaction type
Also fix decoderawtransaction to not show reqSigs or addresses for
nulldata txouts. (Previous version also left reqSigs uninitialized
mistakenly)
2013-10-24 04:32:35 -04:00
Wladimir J. van der Laan faf923f06a Merge pull request #3135 from Diapolo/bitcoingui
bitcoingui: show main window (if hidden) on modal messages
2013-10-24 00:21:54 -07:00
Wladimir J. van der Laan 7ed1f6b421 Merge pull request #3139 from Diapolo/maturity
[Qt]: fix num Blocks to maturity in Tx description
2013-10-24 00:16:41 -07:00
Philip Kaufmann 800d5b14c7 [Qt]: fix num Blocks to maturity in Tx description
- as we have main.h included in transactiondesc.cpp, we now also use
  COINBASE_MATURITY +  1 for the descriptive string
- fixes #3131
2013-10-24 09:04:46 +02:00
Philip Kaufmann 4315ec1a72 RPC: error code changes and prevent crash with walletpassphrase
- fix crash with walletpassphrase by checking if RPC server is running and
  give a friendly error message how to fix this (fixes #3100)
- add 3 new RPCErrorCodes RPC_SERVER_NOT_STARTED, RPC_NODE_ALREADY_ADDED
  and RCP_NODE_NOT_ADDED (I checked the source to not use a number already
  in use for RPC_SERVER_NOT_STARTED)
- use the new codes where needed / missing
- add missing use of RPC_INVALID_PARAMETER
2013-10-24 09:03:02 +02:00
Philip Kaufmann 8abac716ea bitcoingui: show main window (if hidden) on modal messages 2013-10-23 15:12:28 +02:00
Wladimir J. van der Laan 840905a8fd Add test for monetary value parsing
Just-in-case sanity test for JSON spirit and AmountFromValue.
Also update rpc_format_monetary_values test to use ValueFromAmount,
so that ValueFromAmount is also tested.
2013-10-23 13:37:51 +02:00
Wladimir J. van der Laan 4538130790 Add test for monetary value formatting
Tests for issue #3126.
This problem pops up after upgrading json-spirit.
2013-10-23 09:42:48 +02:00
Wladimir J. van der Laan 33a2febf5d qt: show payment information in one text area
Simplifies the dialog (makes it look less crowded) as well
as the code and makes it possible to copy multiple fields at once.
Also format bitcoin URI as URI, add copy button for URI.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 786b066f03 qt: move bitcoin URI formatting to guiutil
Follow the same pattern as the parseBitcoinURI function.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 8a7f37c797 qt: use SendCoinsRecipient for payment request information
This brings some symmetry into the design by using the same object
both for incoming URIs that are parsed as for outgoing URIs that
are formatted.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 03535acd05 qt: add message field to SendCoinsRecipient
Also update URI parsing to fill in this field.
Note that the message is not currently used in any way with the client.
It should be stored with the transaction.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 82095923bb qt: allow dragging, copying and saving QR code
Add context menu and drag handling to QR code widget.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 864a6f790e qt: remove verify/send message and send coins from address book
These no longer make sense in the new workflow. It's less
clicks to reach sign/verify message from the menu. And sending
from the address book is one kind of automatic address reuse
we're trying to avoid.
2013-10-23 09:15:25 +02:00
Wladimir J. van der Laan 74fb765e29 qt: rework "receive coins" workflow 2013-10-23 09:15:24 +02:00
Philip Kaufmann 2e11999e2b remove duplicate -rpcsslciphers help message from init 2013-10-22 20:43:19 +02:00
Jeff Garzik fcb9f26466 Merge pull request #3127 from jgarzik/smells-like-json-spirit
Revert recent json-spirit changes
2013-10-22 07:25:54 -07:00
Wladimir J. van der Laan b3dd90c122 Merge pull request #3082 from laanwj/2013_10_rpccli3
Add separate bitcoin-rpc client
2013-10-22 07:18:19 -07:00
Jeff Garzik 406b1f05f6 Revert "JSON Spirit updated to v4.06"
This reverts commit 2227389fa8.
2013-10-22 05:43:46 -04:00
Jeff Garzik 0db9a805bd Revert "Switch to using raw_utf8"
This reverts commit 2ecb7555a9.
2013-10-22 05:43:38 -04:00
Gavin Andresen 125bdead3e Merge pull request #2740 from constantined/constantined
UTF-8 support for JSON-RPC
2013-10-22 01:20:02 -07:00
Philip Kaufmann 81bdc9a512 splashscreen: use TestNet() instead of unneeded string processing 2013-10-22 09:03:50 +02:00
Gavin Andresen be484db274 Merge pull request #2738 from jgarzik/op_return
Relay OP_RETURN data TxOut as standard transaction type.
2013-10-21 22:47:24 -07:00
Gavin Andresen 10dc3c7473 Merge branch 'bugfix_unknownoutputs' of git://github.com/luke-jr/bitcoin
Conflicts:
	src/wallet.cpp
Fixed LogPrint/printf merge conflict.
2013-10-22 15:34:11 +10:00
Josh Lehan 547c61f8d8 Adding new "addrlocal" field to RPC getpeerinfo.
The existing CNode::addrLocal member is revealed to the user,
as an address string, similar to the existing "addr" field.
Instead of showing garbage or empty string,
it simply will not appear in the output if local address not known yet.
2013-10-21 02:23:05 -07:00
Wladimir J. van der Laan 2a03a39020 Add separate bitcoin-rpc client
This adds an executable `bitcoin-rpc` that only serves as a Bitcoin RPC
client.
The commit does not remove RPC functionality from the `bitcoind` yet,
this functionality should be deprecated but is left for a later version
to give users some time to switch.
2013-10-21 09:22:48 +02:00
Gavin Andresen cc7562b7d2 Merge pull request #3104 from Diapolo/rpcssl-defaultciphers
update default -rpcsslciphers to include TLSv1.2
2013-10-20 19:50:11 -07:00
Gavin Andresen 496c2a3542 Merge pull request #3074 from laanwj/2013_10_remove_default_key_1
Remove automatic update of default key
2013-10-20 19:40:43 -07:00
Gavin Andresen 749230d05c Merge pull request #2840 from sipa/nosendlock
Allow SendMessages to run partially without cs_main
2013-10-20 19:06:53 -07:00
Gavin Andresen 34f72ad6ef Merge pull request #3046 from sarchar/lockedpage-change
Changing LockedPageManager to use a managed instance
2013-10-20 16:14:26 -07:00
Gavin Andresen dc03c2d584 Merge pull request #3117 from gavinandresen/debuglockprint
Make -DDEBUGLOCKORDER + -debug less noisy
2013-10-20 14:26:21 -07:00
Pieter Wuille 9b1200c23b
Merge pull request #3119
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20 22:25:44 +02:00
super3 db0e8ccd90 Bump Year Number to 2013 2013-10-20 15:25:06 -04:00
Wladimir J. van der Laan 76eb192076 Merge pull request #3108 from Diapolo/paymentserver_style
paymentserver: style fixes / cleanup
2013-10-20 01:01:38 -07:00
Wladimir J. van der Laan 00f198c9a5 Merge pull request #3109 from laanwj/2013_10_remove_walletstack
qt: merge walletstack and walletframe
2013-10-20 00:29:38 -07:00
Chuck 0b8f47dc53 Changing LockedPageManager to use a managed instance
This ensures the allocator is ready no matter when it's needed (as
some STL implementations allocate in constructors -- i.e., MSVC's STL
in debug builds).

Using boost::call_once to guarantee thread-safe static initialization.

Adding some comments describing why the change was made.

Addressing deinitialization of the LockedPageManager object
by initializing it in a local static initializer and adding
an assert in the base's destructor.
2013-10-20 14:29:24 +07:00
Gavin Andresen bd48a4fe49 Merge pull request #2945 from gmaxwell/fee-logic_encourage_sweeping
[Fee logic] Don't count txins for priority to encourage sweeping.
2013-10-19 23:05:04 -07:00
Gavin Andresen f90b690a0d Merge pull request #2884 from gavinandresen/canonicalsizes2
Reject non-canonically-encoded CompactSize
2013-10-19 23:03:04 -07:00
Gavin Andresen d3b0fa1d82 Merge pull request #3008 from gavinandresen/CENTrule
Two small free transaction policy changes
2013-10-19 23:01:47 -07:00
Gavin Andresen 3b9ecfed82 Make -DDEBUGLOCKORDER + -debug less noisy
Print out every mutex lock/unlock if compiled -DDEBUGLOCKORDER
only if -debug=lock is set.
2013-10-20 15:41:15 +10:00
Wladimir J. van der Laan 163145938c qt: remove awkward way of setting GUI pages
Selecting the button for a pages was going through bitcoingui->walletframe->walletview->bitcoingui.
Because of this, the actions for the pages had to be exposed on the BitcoinGUI object.
2013-10-19 17:51:26 +02:00
Philip Kaufmann 95d4a2be95 paymentserver: style fixes / cleanup
- rename reportError() into message() to be in line with our default
  message() signal/slot naming (and can be used for all types of messages)
- rename some QStrings to not collide with message() function
- add a missing message for malformed URIs that IS also used in BitcoinGUI
- fix / extend some comments and misc style fixes
2013-10-19 16:27:04 +02:00
Wladimir J. van der Laan 26702e6930 qt: merge walletstack and walletframe
There were too many levels of indirection here, and the functionality of
walletframe and walletstack can easily be merged. This commit
merges the two which cuts a lot of lines of boilerplate code.
2013-10-18 18:06:19 +02:00
Wladimir J. van der Laan 81cab378cc Merge pull request #3101 from Diapolo/sendcoinsentry
add SendCoinsEntry::updateLabel() function
2013-10-18 07:04:49 -07:00
Philip Kaufmann 1728bf0873 update default -rpcsslciphers to include TLSv1.2
- this extends the accepted ciphersuites with TLSv1.2 ones
- also removes !AH, as I could not find documentation on it and the change
  did not result in a changed ciphersuite list (checked via openssl
  ciphers -v)
- closes #3096 (which also contains more details)
2013-10-17 16:11:25 +02:00
Wladimir J. van der Laan 13b1ecf0d0 Merge pull request #3084 from Diapolo/clientmodel
clientmodel: remove 2 hard-coded values, use CChainParams instead
2013-10-17 04:45:37 -07:00
Gavin Andresen a5bba245a3 Merge pull request #2981 from gmaxwell/tor2onion
Rename -tor to -onion to better reflect what it does.
2013-10-16 20:14:46 -07:00
Gavin Andresen 796e7b7aec Merge pull request #2950 from pstratem/walletload
Walletload
2013-10-16 20:12:38 -07:00
Gavin Andresen 5a8a4be289 Merge pull request #2645 from sipa/inlinesighash
Inline signature serializer
2013-10-16 17:53:31 -07:00
Philip Kaufmann 46b57eb500 add SendCoinsEntry::updateLabel() function
- makes the code for updating a label reusable
- no functional changes
2013-10-16 17:11:39 +02:00
Wladimir J. van der Laan a2bb571c4f Merge pull request #3069 from Diapolo/fix_addressbook
don't touch addressbook when using secure payment-requests
2013-10-15 23:48:47 -07:00
Gavin Andresen 03db5c6112 Merge pull request #3094 from Diapolo/btcamountfield
make BitcoinAmountField::setReadOnly() usable
2013-10-15 22:12:55 -07:00
Gavin Andresen 9e70bff67a Merge pull request #3083 from sipa/chainlocator
CBlockLocator improvements & move to core
2013-10-15 16:31:46 -07:00
Pieter Wuille 7d38af3c49 Push down cs_main locking in ProcessMessage 2013-10-15 22:34:25 +02:00
Pieter Wuille 49d754d915 Run node deletions outside of cs_vNodes 2013-10-15 22:34:25 +02:00
Pieter Wuille 6055b9101b Allow SendMessages to run partially without cs_main
SendMessages() tries to acquire a cs_main lock now, but this isn't nessecary
for much of its functionality. Move those parts out of the locked section,
so they can always be performed, and we hold cs_main for a shorter time.
2013-10-15 22:34:20 +02:00
Philip Kaufmann 75fa27eaca make BitcoinAmountField::setReadOnly() usable
- use it for secure payment-requests (this change allows a copy&paste of
  the amount and looks a little nicer than just a disabled GUI element)
2013-10-15 15:26:22 +02:00
Wladimir J. van der Laan 38d15d8b42 Merge pull request #3080 from Diapolo/sendcoins-paymentreq
Bitcoin-Qt: misc changes for sendcoins and paymentsever
2013-10-15 05:57:17 -07:00
Philip Kaufmann 7dea6345e1 replace %zu with %"PRIszu" macro to prevent compiler warnings 2013-10-15 14:50:58 +02:00
Wladimir J. van der Laan f0c25cf6ec Merge pull request #2924 from sje397/TrafficGraph
[QT] Add network traffic graph to debug window
2013-10-15 03:48:22 -07:00
Philip Kaufmann 96b9603c01 misc spelling / space / style fixes 2013-10-15 12:13:54 +02:00
Philip Kaufmann 47970dac41 clientmodel: remove 2 hard-coded values, use CChainParams instead 2013-10-15 11:55:47 +02:00
Pieter Wuille f9b15a4fc9 Move CBlockLocator to core.h
As CBlockLocator is a P2P data structure, and independent from the
validation logic, it can be moved to core.
2013-10-15 11:09:29 +02:00
Pieter Wuille e4daecda0b Reimplement CBlockLocator's chain-related logic in CChain.
This removes a few unused CBlockLocator methods, and moves the
construction and fork-finding logic to CChain (which can do these
more efficiently, as it has a height-indexable chain available).
It also makes CBlockLocator independent from the validation code.
2013-10-15 11:09:29 +02:00
Gavin Andresen b2ba55c42b Avoid core dump if rpc port is in use.
The cleanup code needs to check for NULL rpcworkers thread group.
2013-10-15 15:30:20 +10:00
Gavin Andresen b9beea6e9d Merge pull request #3077 from sipa/chain
Refactor/encapsulate chain globals into a CChain class
2013-10-14 20:39:00 -07:00
Gavin Andresen ae6601872b Merge pull request #2933 from sipa/leveldb113
Merge upstream LevelDB 1.13
2013-10-14 19:54:27 -07:00
Scott Ellis ce14345a89 Add network traffic graph 2013-10-14 19:02:03 +11:00
Pieter Wuille 9269d0e96e
Merge pull request #2937
971bb3e Added ping time measurement. New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers. (Josh Lehan)
2013-10-13 17:41:28 +02:00
phantomcircuit bc68788317 comment explaining new wallet format for key/wkey entries 2013-10-12 23:44:28 -07:00
Pieter Wuille 4c6d41b8b6 Refactor/encapsulate chain globals into a CChain class 2013-10-11 23:25:50 +02:00