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.
Conflicts:
src/key.cpp
src/main.cpp
src/wallet.cpp
Rebased-from: 2e0c4da3fb1ce78dca1b3db723cf095a94f2f371 0.8.x
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.
Conflicts:
src/core.cpp
Rebased-from: 5d37b9db291cf60d3a1b4a15d00ef00baa7d9f4e 0.8.x
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.
Rebased-from: b56b10252f8f5374cbe750178e57460b4aeaeeef 0.8.x
- 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
- use the new code where needed / missing
Upstream: 4315ec1a72
Conflicts:
src/rpcnet.cpp
src/rpcwallet.cpp
Rebased-from: a80b01cdf6323dae55020933ad1f5ea52f64b0bc 0.8.x
- when closing the client with an open debug window, that window could
become stuck/unsuable (it was still shown wherea the main window was
hidden already)
- fix this by hiding the debug window, when quitting the the client
Rebased-from: 3f8241c65539ceae7dc858f6f85acf3c2c58253b 0.8.x
- ensure message boxes are shown in center of our main window, not
centered on the users desktop
- always prefer user supplied titles for message boxes over the functions
defaults (fixes a bug, where transaction info messages did not contain
information, if it was incoming or outgoing)
Rebased-from: ca3c4d8d61d67f29c5db2b526cbfb5a4e7d9b727 0.8.x
- Move CPU capabilities detection from init.cpp to scrypt.cpp
- scrypt_1024_1_1_256_sp is defined as a macro: no need to check for SSE2
every time it is used
- Test correctness of both scrypt-generic and scrypt-sse2
osx 10.9 changed the default stdlib to libc++. You may need to compile with libstdc++ to prevent some errors. At the same time, boost should be compiled use a cxxflag '-stdlib=libstdc++'
DUST_SOFT_LIMIT of 0.001 means a penalty of an additional mintxfee
is charged for each output smaller than 0.001. This is a key
behavioral disincentive in Litecoin's anti-spam design.
DUST_HARD_LIMIT of 0.00001 means inputs smaller than this size are
ignored by the wallet, not available to coin selection and
effectively do not exist. This too discourages spam.
This is the first step in making the high priority transaction area
available to more people. Future versions of Litecoin will eventually
reduce this to 1KB per tx to match Bitcoin 0.8.6+. We decline to
make that drastic of a reduction now as currently p2pool miners have
too much dust to combine.
Litecoin plays an active role in p2pool development to make this less
of a problem. Litecoin helped p2pool version 13 to reduce the
frequency of dust payouts and increase the smallest dust size to be
roughly 5x bigger. An upcoming version of p2pool is expected to
eliminate a lot more dust payouts.
Modified-from: 9612e4c0d9730dbdb9971e53c72df17dd97daa2a
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.
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.
Rebased-From: 6c98cca9e4
WalletView:
- add new signal showNormalIfMinimized()
- emit the new signal in handleURI() to fix a bug, preventing the main
window to show up when using bitcoin: URIs
Upstream: dbc0a6aba2
- fixes src\net.cpp:1601: Error:invalid conversion from 'void*' to
'const char*' [-fpermissive] in a setsockopt() call on Win32 that was
found by using MinGW 4.8.1 compiler suite
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.
Rebased-from: 106f133de6
* code nits
* introduced GUIUtil::setClipboard
* calling getBalance(coinControl) now in walletmodel.cpp
* replaced "WARNING" with "Warning"
* added notr="true" to ui non translatable strings