This updates the src/leveldb subtree to LevelDB 1.15 (+ our patches).
The tree is pulled from the bitcoin/leveldb repository, branch bitcoin-fork.
This updates the src/leveldb subtree to LevelDB 1.15 (+ our patches).
The tree is pulled from the bitcoin/leveldb repository, branch bitcoin-fork.
- add a check for CKey::size() of a and b (size can be 0 or 32)
- change the fixed value in memcmp() to use a.size() instead
- fixes #3090
Changed CDataStream::GetAndClear() to use the most obvious
get get and clear instead of a tricky swap().
Added a unit test for CDataStream insert/erase/GetAndClear.
Note: GetAndClear() is not performance critical, it is used only
by the send-a-message-to-the-network code. Bug was not noticed
before now because the send-a-message code never erased from the
stream.
I needed this to test the new "reject" p2p message, but it should be generally
useful for fuzz-testing network message handling code.
Remove redundant insert method in serialize
Interaction cleanups between main and wallet
-fuzzmessagestest=N : randomly corrupt 1-of-N sent messages
fix wrong memcmp() usage in CKey::operator==
- re-work -debug help message text
- make -debug log every debugging information again (even all categories)
- remove unneeded fDebug checks in front of LogPrint()/qDebug(), as that
check is done in LogPrintf() when category is != NULL (true for all
LogPrint() calls
- remove fDebug ONLY in code which is NOT performance-critical
- harmonize addrman category name
- deprecate -debugnet usage, should be used via -debug=net and remove the
corresponding global
[Qt] walletview: make backupWallet() use GUIUtil::getSaveFileName()
- allow to use message() in transactionview by connecting to the
message() signal in WalletView
- use message() for displaying success or failure of export
- rework the strings to be more detailed / informative
- additional small cleanups
- add new processSendCoinsReturn() function, which parses the
status of WalletModel::SendCoinsReturn and generates a pair consisting
of a message and message flags
- result is we only need one emit message() call
- this change ensures that the GUI is shown for warnings/errors in
sendcoinsdialog, because of message() taking care of that for modal
messages
- changes 2 warning message into error messages and removed "Error:"
in front of the actual error message string
re-work -debug switch handling
71ba467 [Qt] sendcoinsdialog: convert QMessageBox usage to message() (Philip Kaufmann)
9eb4ab6 transactionview: make exportClicked() use message() (Philip Kaufmann)
868d3ee transactionview: add message() signal (Philip Kaufmann)
- this shows insecure (unsecured) payment requests in a new yellowish
colored UI (based on the secure payment request UI) instead of our
normal payment UI
- allows us to receive paymentACK messages for insecure payment requests
- allows us to handle expirations for insecure payment request
- changed walletmodel, so that all types of payment requests don't touch
the addressbook
- as one this pulls main purpose is to change a payment request to
be displayed as a single sendcoins entry
- use a QStringList to store valid addresses and format them for GUI and
debug.log usage via .join()
As block index entries have a flag for marking invalid blocks, the
'best invalid work' information can be derived from there. In addition,
remove the global from main.h
This means they are declared static, and their extern definition in
main.h is removed. Also moved CBlockIndexWorkComparator to the .cpp
file.
a616206 Give peer time-adjustment data an own lock (Pieter Wuille)
0056095 Show short scriptPubKeys correctly (Peter Todd)
22de68d Relay OP_RETURN TxOut as standard transaction type (Peter Todd)
Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
caca6aa Make some globals in main non-public. (Pieter Wuille)
85eb2ce Do not use the redundant BestInvalidWork record in the block database. (Pieter Wuille)
Unless a .gitignore pattern is anchored, it'll match in any directory, not juts at the top level. Simplify .gitignore accordingly.
.gitignore: Simplify references to the same file in different directories
Mempool refactor
Reduce latency in network processing
No more specific handling of GUI in bitcoin core.
Replace the last usage of fHaveGUI with a fForceServer
parameter on AppInit2.
Make util phexdigit array reusable
make -logtimestamps default on and rework help-message
Closes #839
qt: add license header to source files
Make time facet non-constant
No more fHaveGUI
[Qt] use tr() instead of QObject::tr() in intro.cpp
[Qt] remove unused optionsmodel from addressbookpage
395d0d5 rework an ugly hack in processPaymentRequest() (Philip Kaufmann)
952d2cd make processPaymentRequest() use a single SendCoinsRecipient (Philip Kaufmann)
983cef4 payment-request UI: use SendCoinsRecipient.message for memo (Philip Kaufmann)
c6c97e0 [Qt] Rework of payment request UI (mainly for insecure pr) (Philip Kaufmann)
Check integrity of gitian input source tarballs
a80b1a0 [Qt] make event() and eventFilter() in askpassphrasedialog protected (Philip Kaufmann)
- rework window title to not include Bitcoin - in front, as no other
dialog does this
- favor a connect() call over an own function for clearing the traffic
graph
- write monospace lowercase (seems to be correct after some web search)
and add a comment that we should avoid / remove fixed font sizes
[Qt] rename rpcconsole window
Split MIN_PROTO_VERSION into INIT_PROTO_VERSION and MIN_PEER_PROTO_VERSION
Test changes
b64187d Rename leveldb.{h,cpp} to leveldbwrapper.{h,cpp}. (Brandon Dahler)
Use misc methods of avoiding unnecesary header includes.
Replace int typedefs with int##_t from stdint.h.
Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
Normalize QT_VERSION ifs where possible.
Resolve some indirect dependencies as direct ones.
Remove extern declarations from .cpp files.
51ed9ec Cleanup code using forward declarations. (Brandon Dahler)
I regenerated the alert test data; now alerts are tested
against a protocol version way above the current protocol
version.
So we won't have to regenerate them every time we bump
PROTOCOL_VERSION in the future.
Reject p2p message
Cleanup refactoring of coins/mempool
Also update pull-tester's error message.
Also mention `autoconf` as required package.
doc: add note about building on Ubuntu 13.10
Update build docs that refer to old makefile.* files.
Autoconf improvements
A plain DOS window doesn't have the right path settings, whereas
the MSYS shell window does.
- remove explicit init of netManager as this is done in the constructor
anyway
- move initNetManager() call to uiReady(), which removes an assert() and
allows us to use message() in initNetManager() (currently unused but
could be necessary because of proxy related messages)
- make initNetManager() private
- update paymentservertests.cpp
Fixed. Split off build, and bootstrap link.
qt: add Open URI dialog
Squash README
[Qt] paymentserver: start netManager in uiReady()
- harmonize function with GUIUtil::getOpenFileName()
- also make PNG Image singular (grammar)
Silence useless warning in src/json/json_spirit_writer_template.h to mak...
misc small changes to polish after include cleanup
[Qt] remove GUIUtil::getSaveFileName() default arguments
Fixes ancient issue #1460.
qt: make URI scheme comparison case insensitive
Introduce disable-wallet / no-wallet mode (rebased)
Based on the proposal, update the help message of rpc methods
- strings arguments are in double quotes rather than square brackets
- numeric arguments have no quotes (and no default value)
- optional parameters are surrounded by round brackets
- json arguments are strings but don't use double quotes
Added 3 sections for the details
- Arguments: lists each argument, it's type, required or not, a default, and a description
- Result: The method result, with json format if applicable, type, and a description
- Examples: examples calls using bitcoin-cli and curl for json rpc call
Problems
- maybe this is too verbose
- lines might be too long
- description are not good or complete
- examples may be too much
Otherwise, format specifiers such as %llu will not work on XP or
earlier.
This bug was introduced with 51ed9ec9.
http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
Clean up RPC help messages (rebased)
Use C99 printf statements in mingw
Don't require lupdate to build with Qt. Like xgettext it is only
needed to update translations, not for normal builds.
This fixes the gitian build (broken by fcfbf547d).
This is more consistent with other places in the GUI.
Adds three new languages:
- de_AT: German (Austria)
- gl: Galician
- sl_SI: Slovenian (Slovenia)
Updates many others.
Thanks to the translators contributing on Transifex!
- remove default value for parent variable in dialogs, which should appear
centered over main GUI and pass appropriate value
- add some addition NULL pointer checks
qt: align amounts on overview page to the right
qt: language update from transifex
- example: if util.h includes stdint.h, remove it from util.cpp, as
util.h is the first header included in util.cpp
fabba0e orphan spaces cleanup ;-) (Philip Kaufmann)
We already have the exact same funtionality in /contrib/bitrpc/bitrpc.py
If we really do need standalone scripts, then I'll write something to
pull it from that file, rather than having duplicate code.
Forgot to remove wallet tools from index.
Wallet Tools Follow Up Info
309f796 [Qt] make most Windows appear centered on main GUI (Philip Kaufmann)
6a86c24 Coin Control Features (Cozz Lovan)
8dfd8c6 pass nBytes as parameter to GetMinFee(..) (Cozz Lovan)
79fac3f [Qt] use GUIUtil::setClipboard() where possible (Philip Kaufmann)
I was merging change this every time before generation of
the doxygen developer docs (https://dev.visucore.com/bitcoin/doxygen/)
but there's no reason why it can't just be merged upstream.
Make users accustomed to the other subdivision units (mBTC, muBTC)
by showing the total amount in all units in the confirmation dialog.
This was recently raised on the mailing list and could be a preparation
for switching over the default unit eventually.
This adds https://github.com/bitcoin/bitcoin.org/pull/270 to the to-do
list for each release, avoiding future situations like
https://bitcointalk.org/index.php?topic=336042.0.
- add missing license headers
- make compatible with Qt5
- enforce header cleanup style
- small code style cleanups
- rename Coin Control dialog into Coin Control Address Selection
- use default font for the windows labels (no monospace)
0e165b9 doc: small doxygen update (Wladimir J. van der Laan)
Add additional data update to release-process.md
0689f46 Coincontrol cleanup (e.g. add missing license) (Philip Kaufmann)
- Add aarch64 to the list of lib64 architectures
- Fixed cut-and-paste error.
- See http://savannah.gnu.org/patch/?7576 for further details.
- Use 'ls -r' rather than non-portable tool 'tac'.
- Simplify filepattern in ls expression so dylib (on OSX) are also detected.
- Fixed detection of dynamic libraries on Mac OS X (*.dylib)
See http://savannah.gnu.org/patch/?7719 for further details.
- Use 'ls -r' rather than non-portable tool 'tac'. Simplify filepattern in ls expression so dylib (on OSX) are also detected.
- Use 'ls -r' in order to try newer version before older ones. Simplify
ls pattern so also dylibs are detected.
- Add support for Clang
Further details can be found at http://savannah.gnu.org/patch/?8186
Update boost m4 files
Keep a list of requested payments in the Receive tab so that a user can
recall previously created requests after closing their windows.
Currently this list is not stored between bitcoin-qt sessions. This can
be implemented later, but it is not clear where it should be stored as
I don't think it belongs in the wallet (maybe in QSettings?)
Remove Wallet Tools
- this was unused for the label and also makes no sense, so remove it
379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
When building from tarball (i.g. not from git source tree or when git
is not available) `genbuild.sh` write undefined $TIME to "build/build.h".
Even worse, when TIME is set in the environment then its value
is written instead of a date.
For me this change fixed FTBFS which I got because I had
TIME enviroment variable set with format for time(1) utility.
RPC client option: -rpcwait, to wait for server start
Provide build time when building from tarball:
67448b2 [Qt] make a UI element in sendcoins non-validated (Philip Kaufmann)
I'm writing some wallet regression tests using -regtest mode, and
need to generate an initial multi-hundred-block chain. Repeatedly
calling setgenerate to generate one block is slow and doesn't
work properly, because block creation happens asynchronously.
This adds two features to setgenerate in -regtest mode:
1) Instead of being interpreted as number of threads to start, the
third argument is the number of blocks to generate.
2) setgenerate will not return until the block creation threads
have created the requested number of blocks.
brew --prefix retruns a fully qualified path, so using -L/$prefix results in a path with two leading '/'.
relicts from the CTransaction refactor.
c89d59c Remove '/': prefix always starts with '/' (Florin)
fb0507f qt: show all units in send confirmation (Wladimir J. van der Laan)
848fe68 cleanup error message consistency (Julian Langschaedel)
e5adec3 contrib: add sipa's github-merge script (Wladimir J. van der Laan)
- this adds a delete button for insecure and secure payment requests in
the sendcoins dialog
- it also enables the delete button even for single and empty entries, as
this is much easier to handle and doesn't need to special case single
entries
- big parts of the ui file were changed, because I copied the delete
button and had to delete the layout too and created it from scratch
(which seems to cleanup the rows and colums in the layout also, which is
nice IMHO)
c8b7425 setgenerate creates multiple blocks in -regtest mode (Gavin Andresen)
After discussing with BlueMatt, this appears to be harmless in its
current state since it's always set before it's used. Initialize it
anyway for readability and future safety.
106f133 Fix uninitialized variable added in b33b9a6fe (theuni)
This was removed by 25c0cce7f. It was apparently removed in qt5, but
may return for 5.1.
qa/rpc-tests/wallet.sh runs a three-node -regtest network,
generates a fresh blockchain, and then exercises basic wallet
sending/receiving functionality using command-line RPC.
Split bitcoinrpc up into
- rpcserver: bitcoind RPC server
- rpcclient: bitcoin-cli RPC client
- rpcprotocol: shared common HTTP/JSON-RPC protocol code
One step towards making bitcoin-cli independent from the rest
of the code, and thus a smaller executable that doesn't have to
be linked against leveldb.
This commit only does code movement, there are no functional changes.
871ac37 qt: restore icon dock menu (theuni)
a946aa8 Store and use a sanitized subVer (Mike Hearn)
ba6a4ea Add some additional logging to give extra network insight. (Mike Hearn)
fb78cc2 Split up bitcoinrpc (code movement only) (Wladimir J. van der Laan)
In preparation for expanding autogen.sh.
Initial steps towards supporting out-of-tree builds.
This quiets down the autotools build, making warnings much more visible.
This protects against broken systems which have libminiupnpc.a or
libminiupnpc.so installed but don't have the miniupnpc headers.
0078841 prevent Windows redefinition warning cause by compat.h (Philip Kaufmann)
The SelectParamsFromCommandLine call was missing in bitcoin-cli,
which caused `-testnet` and `-regtest` to be ignored. Add this
call just like in bitcoind.cpp.
9e7776b Integration tests via RPC calls (Gavin Andresen)
9d2b73d bitcoin-cli: Add missing SelectParamsFromCommandLine (Wladimir J. van der Laan)
9ac5a01 Move types.h include before ifaddres.h for u_int declaration (Robert Backhaus)
This dead code can be resurrected from git history if
transaction replacement is ever implemented. Keeping
dead code in the source is a bad idea, because it implies
it was tested and worked at some point, which is not true.
GetValueIn makes more sense as a CTransaction member.
Also changes mempool to store CTxMemPoolEntries
to keep track of when they enter/exit the pool.
Add verbose flag to getrawmempool
84b695c [Qt] allow deletion of payment-requests in sendcoins (Philip Kaufmann)
mutex debugging routines: LocksHeld() and AssertLockHeld()
bae6c7e Fix a rare crash on Mac OS X, by removing a setFocus on the payTo field that was not necessary, as the field still receives focus without it. (Ryan Niebur)
less bytes, same images
Lossless image optimization
- remove monospace labels from sendcoinsdialog also
- use a validated line edit for the change address
- add a tooltip to change address switch
- ensure we have a valid change address in
CoinControlDialog::coinControl->destChange or just CNoDestination()
- some small ui file changes
- remove style sheets from ui files and use Qt attributes instead
- make some more strings untranslatable, to make life for translators
easier
- split up long tooltips an rework the texts a little
There were quite a few places where assert() was used with side effects,
making operation with NDEBUG non-functional. This commit fixes all the
cases I know about, but also adds an #error on NDEBUG because the code
is untested without assertions and may still have vulnerabilities if
used without assert.
libpng was being sha256summed twice, and miniupnpc wasn't being checked at all.
Sanitize assert usage and refuse to compile with NDEBUG.
Fix file hash verification error in deps-win32.yml
Remove unnecessary dependencies for bitcoin-cli
(leveldb, berkelydb, wallet, RPC server)
Build system changes:
- split libbitcoin.a into libbitcoin_common.a, libbitcoin_server.a and
libbitcoin_cli.a
Code changes (movement only):
- split up HelpMessage into HelpMessage in init.cpp and HelpMessageCli
in rpcclient.cpp
- move uiInterface from init.cpp to util.cpp
bitcoin-cli: remove unneeded dependencies (only minor code movement)
- remove default arguments for notificator
- re-order some calls to use same ordering in Qt files
- style police changes (spaces, comments and such)
d3207b6 [Qt] coin-control features GUI cleanup 3 (Philip Kaufmann)
834e14e [Qt] coin-control features GUI cleanup 2 (Philip Kaufmann)
BIP 72 was changed to save six bytes in bitcoin: URIs.
Use deleteLater() instead of delete, as it is not allowed
to delete widgets directly in an event handler.
Should solve the MacOSX random crashes on send with coincontrol.
6c98cca qt: use deleteLater to remove send entries (Wladimir J. van der Laan)
General functions used throughout the RPC framework
don't belong in rpcwallet.
Where to place `getinfo` is a difficult issue
as it shows information from the wallet, net and
block chain. However, I moved it out of rpcwallet
as the command needs also to be available without
wallet.
Delimit all code that uses the wallet functions
in implementation files that conditionally use the wallet.
This was a leftover from the times in which
peers.dat depended in BDB.
Other functions in db.cpp still depend on BerkelyDB,
to be able to compile without BDB this (small)
functionality needs to be moved to another file.
Make it possible to build Bitcoin without wallet
(and thus without BDB) so that it only functions as node.
Mention the new --disable-wallet mode.
Also, correct the BDB entry in the dependencies table.
This breaks the dependency on crypter for disable-wallet builds.
Split wallet tests from other RPC tests.
Now no #ifdef ENABLE_WALLET are needed anymore in either file.
CWalletTx::AddSupportingTransactions() was adding empty transaction
to vtxPrev in some cases. Skip over these.
Part one of the solution to #3190. This prevents invalid vtxPrev from
entering the wallet, but not current ones being transmitted.
Versions of bitcoin before 0.8.6 have a bug that inserted
empty transactions into the vtxPrev in the wallet, which will cause the node to be
banned when retransmitted, hence add a check for !tx.vin.empty()
before RelayTransaction.
4ef92a9 Refuse to retransmit transactions without vins (Wladimir J. van der Laan)
d3ef9b0 Prevent empty transactions from being added to vtxPrev (Wladimir J. van der Laan)
38cbeab fix typo in rpcnet.cpp (Philip Kaufmann)
Change release-process.md to sign release tags
1e01f7c Payment request URI syntax changed, from request=... to r=... (Gavin Andresen)
- make eventFilter() private and pass events on to QObject::eventFilter()
instead of just returning false
- re-work paymentservertest.cpp to correctly handle the event test
after the above change (rewrite test_main to allow usage of
QCoreApplication:: in the tests)
- delete socket when we were unable to connect in ipcSendCommandLine()
- show a message to the user if we fail to start-up (instead of just a
debug.log entry)
- misc small comment changes
4cf3411 [Qt] misc PaymentServer changes (e.g. changes to eventFilter()) (Philip Kaufmann)
Commit be066fad accidentally removed the hex field.
This gets in the way of doing offline signing.
(credit belongs to sipa for actually looking for the
cause instead of being lazy like me and just shrugging
and writing the scriptpubkey from the asm.)
Restore hex to getrawtransaction vout scriptPubkey.
5094f8d Split off rpc_wallet_tests (Wladimir J. van der Laan)
829c920 Move CCryptoKeyStore to crypter.cpp (Wladimir J. van der Laan)
ae6ea5a Update build-unix.md to mention --disable-wallet (Wladimir J. van der Laan)
4f9e993 Add --disable-wallet option to build system (Wladimir J. van der Laan)
d004d72 Move CAddrDB frrom db to net (Wladimir J. van der Laan)
48ba56c Delimit code with #ifdef ENABLE_WALLET (Wladimir J. van der Laan)
991685d Move getinfo to rpcnet.cpp (Wladimir J. van der Laan)
bbb0936 Move HelpExample* from rpcwallet to rpcserver (Wladimir J. van der Laan)
26d1b65 src/Makefile.am: Simplify clean of leveldb (Josh Triplett)
a26a367 configure.ac: Check for miniupnpc headers, not just -lminiupnpc (Josh Triplett)
82ccb05 autogen.sh: Stop passing --verbose to autoreconf (Josh Triplett)
e12dafd autogen.sh: Use long options to autoreconf, for self-documentation (Josh Triplett)
19b9add autogen.sh: Support running from outside the source directory (Josh Triplett)
97d285a autogen.sh: Use set -e to fail if any command fails (Josh Triplett)
f80b723 autogen.sh: Add a /bin/sh shebang. (Josh Triplett)
ccd1372 [Qt] small notificator and style changes (Philip Kaufmann)
Fixes #3372 -- crash at shutdown.
Add main-specific node state & move ban score
The following mining-related RPC calls don't use the wallet:
- getnetworkhashps
- getmininginfo
- getblocktemplate
- submitblock
Enable them when compiling with --disable-wallet.
Use a fixed script instead of a CReserveKey from the wallet.
This does not affect the functionality or result of the tests as they never
check the state of the wallet in the first place.
80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
- cleanup Info.plist.in and specify high DPI mode enable command as per
http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/
- move setting of QApplication::setAttribute() to bitcoin.cpp and add
attribute for enabling use of high DPI pixmaps for Qt >= 5.1
- add missing setWindowTitle() on Mac
- cleanup Mac / non-Mac setup in bitcoingui.cpp
84f8551 [Qt] misc small Mac related changes/cleanups (Philip Kaufmann)
- replaces a pwalletMain->IsLocked() check
- in keypoolrefill init kpSize to 0 as we have the logic to determine max
kpSize in pwalletMain->TopUpKeyPool() anyway
f914c7a rpcwallet: use EnsureWalletIsUnlocked() where possible (Philip Kaufmann)
666893b qt: keep a list of requested payments (Wladimir J. van der Laan)
Allow mining RPCs with --disable-wallet
Fixes #3361
b9c3416 Add protobuf-compiler dependency package for debian (Wladimir J. van der Laan)
fdbdb7f cleanup includes in rpcnet.cpp (Philip Kaufmann)
b6aafca some string and indentation updates in init/rpcclient (Philip Kaufmann)
Update build-osx.md
4f99b16 Release process: add section about announcing new release (Wladimir J. van der Laan)
- hide the entry about to be deleted, and if it is the last entry add a
new one, so that we always have one entry in our list
24646ee [Qt] fix possibilty to delete last sendcoins entry (Philip Kaufmann)
Fixes #3358. This affects preinstalled autotools on osx 10.6.
Use 'make check' instead of 'make test'
build: fix syntax error on older m4/autoconf.