Commit Graph

7021 Commits

Author SHA1 Message Date
Alex Morcos
a4dc487b0e Save the last unnecessary database read
It's possible coins with the same hash exist when you create a duplicate coinbase, so previously we were reading from the database to make sure we had the old coins cached so if we were to spend the new ones, the old ones would also be spent.  This pull instead just marks the new coins as not fresh if they are from a coinbase, so if they are spent they will be written all the way down to the database anyway overwriting any duplicates.
2018-01-13 01:01:21 +03:00
lateminer
ef33662381 Merge remote-tracking branch 'janko33bd/Blackcoin-Lore' into build-fixes-0.13 2018-01-12 22:22:52 +03:00
janko33bd
982ea00de5 Merge pull request #22 from lateminer/testnet
Make Lore work on testnet, first attempt
2018-01-12 19:50:52 +01:00
Wladimir J. van der Laan
b1d5409eb8 build: python 3 compatibility 2018-01-12 21:31:33 +03:00
lateminer
c4c9d81823 Use std::shared_ptr instead of boost::shared_ptr 2018-01-12 07:34:45 +03:00
janko33bd
714d2650b5 added SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS 2018-01-10 23:13:59 +01:00
janko33bd
602f3d2aad removing confusing tooltip 2018-01-10 23:06:58 +01:00
Ivo van der Sangen
33137dbc6d Include select.h when WIN32 is not defined 2018-01-10 23:09:20 +03:00
Gregory Maxwell
43f8575bc3 Fix qt/paymentrequestplus.cpp for OpenSSL 1.1 API.
This avoids a compile failure on newly installed debian stretch systems.
2018-01-10 23:09:03 +03:00
Gregory Maxwell
ae3b2575d9 Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API.
This avoids a compile failure on newly installed debian stretch systems.
2018-01-10 23:08:55 +03:00
Wladimir J. van der Laan
8b6c238f0d windows: Add testnet icon for testnet link
Overhauled testnet icon by Jonas Schnelli
2018-01-10 23:02:57 +03:00
Cory Fields
8da4c55c85 bulid: fix "make translate" when out-of-tree 2018-01-10 22:59:00 +03:00
Cory Fields
0d2cf50377 build: add temporary fix for "bad magic number" error in out-of-tree builds
This was caused by an pyc files hanging around from previous
python2 invocations, when the matching .py missing from that path.

This should not be a problem with python3's tagged caches.
2018-01-10 22:58:52 +03:00
Cory Fields
9590ee0613 build: more out-of-tree fixups
- clear the __pycache__ during 'make clean'
- Copy the qrc locale file to a temp location and remove it when finished
  (rcc expects everything to be in the same path)
2018-01-10 22:56:52 +03:00
Cory Fields
3efa7adf3b build: out-of-tree fixups
Don't glob the leveldb for dist. That means we need to enumerate the headers.
2018-01-10 22:56:44 +03:00
lateminer
72fb9f5567 Fix typo
wallet.cpp
2018-01-10 22:12:18 +03:00
lateminer
72875a2116 Relay double-spends, subject to anti-DOS
cef3711500 (diff-7ec3c68a81efff79b6ca22ac1f1eabbaL929)
2018-01-10 21:52:38 +03:00
lateminer
85aaa0b023 Fix comparison between signed and unsigned int
rpcwallet.cpp
wallet.cpp
2018-01-10 20:32:50 +03:00
Cory Fields
6a8b389cde build: No need to check for leveldb atomics
They're guaranteed with c++11
2018-01-10 00:08:53 +03:00
Cory Fields
155af18074 leveldb: integrate leveldb into our buildsystem 2018-01-10 00:06:35 +03:00
Wladimir J. van der Laan
5acb13a540 test: Rename wallet.dat to wallet_test.dat
Indicate that the file name is not hardcoded, and a little bit of safety
so that it never nukes the main wallet.

Suggestion by Marco Falke.
2018-01-10 00:03:49 +03:00
lateminer
897cef91cc Fix: wallet_ismine.h → script/ismine.h 2018-01-10 00:03:40 +03:00
Wladimir J. van der Laan
a0bf1386b7 wallet_ismine.h → script/ismine.h 2018-01-10 00:03:31 +03:00
Wladimir J. van der Laan
8a0a14b77b test: Create test fixture for wallet
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by
making the wallet tests use their own fixture.
2018-01-10 00:02:00 +03:00
lateminer
4d9bacf1ae Fix: test: move accounting_tests and rpc_wallet_tests to wallet/test 2018-01-10 00:01:51 +03:00
Wladimir J. van der Laan
f508e91677 test: move accounting_tests and rpc_wallet_tests to wallet/test 2018-01-10 00:01:44 +03:00
Pavel Janík
4e459ffc7b Use relative paths instead of absolute paths 2018-01-09 23:52:11 +03:00
Pavel Janík
69a14ff63a make clean should clean .a files 2018-01-09 23:47:15 +03:00
Luke Dashjr
598c291182 LDADD dependency order shuffling 2018-01-09 23:43:24 +03:00
Luke Dashjr
e5692bc4cb Bugfix: Always include univalue in DIST_SUBDIRS 2018-01-09 23:43:16 +03:00
Luke Dashjr
d4251e1075 Build against system UniValue when available 2018-01-09 23:42:52 +03:00
Luke Dashjr
6e4270f333 Bugfix: The var is LIBUNIVALUE,not LIBBITCOIN_UNIVALUE 2018-01-09 23:42:42 +03:00
Cory Fields
a5cb913081 c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally
Due to include ordering, defining in one place was not enough to ensure correct
usage. Use global defines so that we don't have to worry abou this ordering.

Also add a comment in configure about the test.
2018-01-09 23:41:56 +03:00
Cory Fields
e013f50397 c++11: CAccountingEntry must be defined before use in a list 2018-01-09 23:36:00 +03:00
janko33bd
48feed03ef Merge pull request #19 from lateminer/ui-respendalert
UI to alert of respend attempt affecting wallet.
2018-01-09 21:34:03 +01:00
Cory Fields
2579687f83 c++11: don't throw from the reverselock destructor
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.

Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.

To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.

Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
2018-01-09 23:32:07 +03:00
Cory Fields
6229258723 c++11: detect and correct for boost builds with an incompatible abi
This is ugly, but temporary. boost::filesystem will likely be dropped soon
after c++11 is enabled. Otherwise, we could simply roll our own copy_file. I've
fixed this at the buildsystem level for now in order to avoid mixing in
functional changes.

Explanation:
If boost (prior to 1.57) was built without c++11, it emulated scoped enums
using c++98 constructs. Unfortunately, this implementation detail leaked into
the abi. This was fixed in 1.57.

When building against that installed version using c++11, the headers pick up
on the native c++11 scoped enum support and enable it, however it will fail to
link. This can be worked around by disabling c++11 scoped enums if linking will
fail.

Add an autoconf test to determine incompatibility. At build-time, if native
enums are being used (a c++11 build), and force-disabling them causes a
successful link, we can be sure that there's an incompatibility and enable the
work-around.
2018-01-09 23:31:56 +03:00
lateminer
c3bddf47b2 UI to alert of respend attempt affecting wallet.
ba478d229b
2018-01-09 23:25:37 +03:00
lateminer
070424672b Add -respendnotify option, new RPC data, reg tests
f2a6c79aa1 (diff-b4d9f378d56095dfaad2a3802d633a39)
2018-01-09 22:41:38 +03:00
lateminer
765380cf35 Revert "Make RelayWalletTransaction attempt to AcceptToMemoryPool."
This reverts commit c1a0128033.
2018-01-08 22:35:33 +03:00
lateminer
e8ad469c2c Remove unnecessary code 2018-01-08 22:25:00 +03:00
Cory Fields
b06d926965 build: Enumerate ctaes rather than globbing 2018-01-08 22:04:30 +03:00
Cory Fields
aa0181e44e crypter: shuffle Makefile so that crypto can be used by the wallet 2018-01-08 22:04:21 +03:00
Cory Fields
d4b0ab2149 crypter: constify encrypt/decrypt
This makes CCrypter easier to pass aroundf for tests
2018-01-08 21:59:36 +03:00
Cory Fields
b1913e4dd2 crypter: add tests for crypter 2018-01-08 21:59:28 +03:00
Cory Fields
df2b01b7cd crypter: add a BytesToKey clone to replace the use of openssl
BytesToKeySHA512AES should be functionally identical to EVP_BytesToKey, but
drops the dependency on openssl.
2018-01-08 21:57:20 +03:00
Cory Fields
f48a300f74 crypter: hook up the new aes cbc classes 2018-01-08 21:57:12 +03:00
Cory Fields
07f4b56b4c crypter: fix the stored initialization vector size
AES IV's are 16bytes, not 32. This was harmless but confusing.

Add WALLET_CRYPTO_IV_SIZE to make its usage explicit.
2018-01-08 21:57:02 +03:00
Cory Fields
cb9ed6bc39 crypto: add aes cbc tests 2018-01-08 21:56:54 +03:00
Cory Fields
200954d962 crypto: add AES 128/256 CBC classes
The output should always match openssl's, even for failed operations. Even for
a decrypt with broken padding, the output is always deterministic (and attemtps
to be constant-time).
2018-01-08 21:56:46 +03:00