daniel
fcb0a1bb9c
change "char pch[200000]" to "new char[200000]"
11 years ago
Wladimir J. van der Laan
fa126effc2
Avoid undefined behavior using CFlatData in CScript serialization
...
`&vch[vch.size()]` and even `&vch[0]` on vectors can cause assertion
errors with VC in debug mode. This is the problem mentioned in #4239 .
The deeper problem with this is that we rely on undefined behavior.
- Add `begin_ptr` and `end_ptr` functions that get the beginning and end
pointer of vector in a reliable way that copes with empty vectors and
doesn't reference outside the vector
(see https://stackoverflow.com/questions/1339470/how-to-get-the-address-of-the-stdvector-buffer-start-most-elegantly/1339767#1339767 ).
- Add a convenience constructor to CFlatData that wraps a vector.
I added `begin_ptr` and `end_ptr` as separate functions as I imagine
they will be useful in more places.
11 years ago
Philip Kaufmann
b612bde521
remove unneded class CNodeCombinedStats; from rpcconsole.cpp
...
- also 2 small style fixes
11 years ago
Philip Kaufmann
3dc1464f0a
add missing vhListenSocket.clear(); to CNetCleanup()
11 years ago
Philip Kaufmann
2831a03b79
remove unused CNode::Cleanup()
11 years ago
Philip Kaufmann
0655fac0b1
miner: indentation fixes, remove for (;;)
...
- change a for (;;) into while (true), as we nowhere else use the first
- init nNonceFound to 0
- fix indentation in BitcoinMiner try/catch block
11 years ago
Pieter Wuille
d38da59bf6
Code simplifications after CTransaction::GetHash() caching
11 years ago
Pieter Wuille
4949004d68
Add CMutableTransaction and make CTransaction immutable.
...
In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.
11 years ago
Pieter Wuille
a0495bb68c
Add <Hasher>::OUTPUT_SIZE
11 years ago
Cory Fields
4791b99e2d
crypto: create a separate lib for crypto functions
...
This lib has no dependencies on other bitcoin functionality. Attempting to
use bitcoin headers will result in a failure to compile.
11 years ago
Cory Fields
f2647cc0e9
crypto: explicitly check for byte read/write functions
...
Don't depend on hard-coded platform lists
11 years ago
Cory Fields
54372482a8
build: move bitcoin-config.h to its own directory
...
This allows us to include its path without making other header includes valid.
11 years ago
Pieter Wuille
3820e01eb9
Extend and move all crypto tests to crypto_tests.cpp
11 years ago
Pieter Wuille
7ecd9739d9
Move {Read,Write}{LE,BE}{32,64} to common.h and use builtins if possible
11 years ago
Pieter Wuille
a5bc9c0917
Add built-in RIPEMD-160 implementation
11 years ago
Pieter Wuille
13b5dfef64
Move crypto implementations to src/crypto/
11 years ago
Pieter Wuille
1cc344ce42
Add built-in SHA-1 implementation.
11 years ago
Pieter Wuille
85aab2a088
Switch miner.cpp to use sha2 instead of OpenSSL.
11 years ago
Pieter Wuille
cf0c47b269
Remove getwork() RPC call
11 years ago
Pieter Wuille
7b4737c878
Switch script.cpp and hash.cpp to use sha2.cpp instead of OpenSSL.
11 years ago
Pieter Wuille
977cdadea8
Add a built-in SHA256/SHA512 implementation.
...
This also moves the HMAC-SHA512 implementation to sha2.cpp.
11 years ago
Peter Todd
38405ac141
Add comment regarding experimental-use service bits
...
As per mailing list discussion.
11 years ago
Peter Todd
99ddc6cb70
Add nLocalServices info to RPC getinfo
...
Also show full 64 bits of services. Previously service bits >32 that
were advertised just didn't show up at all.
11 years ago
Pieter Wuille
806fd19ecb
Allocate receive buffers in on the fly
11 years ago
Philip Kaufmann
fc0c07eb64
small cleanup in src/compat .h and .cpp
...
- add license header
- fix include guards
- fix indentation
11 years ago
Pavel Vasin
ea3acaf383
AvailableCoins: acquire cs_main mutex
...
It's required when called from WalletModel
11 years ago
Wladimir J. van der Laan
6afa49329d
rpc: Add acceptors only when listening succeeded
11 years ago
Wladimir J. van der Laan
33e5b42910
rpc: Ignore and log errors during cancel
...
Cancelling the RPC acceptors can sometimes result in an error about
a bad file descriptor.
As this is the shutdown sequence we need to continue nevertheless,
ignore these errors, log a warning and proceed.
Fixes #4352 .
11 years ago
jtimon
f6984e8141
Add "chain" to getmininginfo, improve help in getblockchaininfo
11 years ago
jtimon
b82b7ec3dc
Get rid of Params().RPCisTestNet()
11 years ago
Philip Kaufmann
1020f599f3
add comment to HelpMessage() to ensure alphabetical ordering
...
- also rename hmm to mode, to be consistent between .h and .cpp
11 years ago
Cory Fields
92a6220711
sanity: hook up sanity checks
11 years ago
Cory Fields
679240d0e9
sanity: add libc/stdlib sanity checks
...
These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
11 years ago
Cozz Lovan
b3c912d93a
[Qt] Change Coin control labels and tooltips because of non-rounding fees
11 years ago
Cozz Lovan
77cbd4623e
Let -zapwallettxes recover transaction meta data
11 years ago
Wladimir J. van der Laan
09eb201b1b
Remove `using namespace std` from header file
...
It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
11 years ago
Wladimir J. van der Laan
1569353b8a
Add `-stopafterblockimport` option
...
Stop after importing blocks. This can be useful for development
and trouble shooting.
11 years ago
Philip Kaufmann
6763018797
[Qt] rename In:/Out: to Received/Sent in traffic tab
...
- collides with In:/Out: used for displaying number of
connections when translating
11 years ago
Wladimir J. van der Laan
b750cf1fb9
Remove cli functionality from bitcoind
...
As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.
Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.
After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
11 years ago
Jeff Garzik
0cafb63025
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant
...
A more complex construction via abs() yields the same end result.
Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
11 years ago
kevin
33cc907dfb
Add DNS seed of open-nodes.org
11 years ago
Wladimir J. van der Laan
5c97aae6da
qt: Unify AboutDialog and HelpMessageDialog
...
They share so much code and functionality that they may as well
be one class.
11 years ago
Wladimir J. van der Laan
45615af26f
Add 'about' information to `-version` output
...
Adds a copyright and attribution message to the `-version` output
(the same as shown in the About dialog in the GUI).
Move the message to a function LicenseInfo in init.cpp.
11 years ago
Wladimir J. van der Laan
18116b06c1
Ignore too-long redeemScripts while loading wallet
...
This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.
Fixes #4313 .
11 years ago
Wladimir J. van der Laan
e5ee8f016e
Remove -beta suffix
...
It conflicts with our normal naming of releases/builds. Fixes #4221 .
11 years ago
Philip Kaufmann
f5ae6c9826
add NetworkIDString() to chainparams
...
- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
and functions
11 years ago
Jeff Garzik
88df548dde
base58: add paranoid return value checks
11 years ago
Andreas Schildbach
c30329adfa
Add testnet DNS seed of Alex Kotenko.
11 years ago
Philip Kaufmann
f3790472f0
remove unused code from getblockchaininfo()
11 years ago
Wladimir J. van der Laan
97789d374c
util: Add function FormatParagraph to format paragraph to fixed-width
...
This is to be used for the `-version` and `-help` messages.
11 years ago