Commit Graph

245 Commits

Author SHA1 Message Date
lateminer
21e7a07a34 Add stake balance in RPC call getwalletinfo 2018-02-01 19:52:18 +03:00
janko33bd
c1e0fac4f8 added stake cache + checked ismine 2018-01-30 23:52:33 +01:00
janko33bd
764797ad06 fixed immature/staking balance 2018-01-18 21:09:55 +01:00
janko33bd
6484a9e9b2 add stake to gui 2018-01-15 23:28:59 +01:00
lateminer
323a6750c2 Add CashAddr Address Format
Ported from Bitcoin Unlimited, Bitcoin ABC
2018-01-14 22:32:08 +03:00
lateminer
3d26f43eb0 mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee
fa331db68b
2018-01-13 01:30: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
lateminer
c4c9d81823 Use std::shared_ptr instead of boost::shared_ptr 2018-01-12 07:34:45 +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
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
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
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
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
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
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
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
Pieter Wuille
77d8ddc6fb Stop treating importaddress'ed scripts as change
Before this, if someone imported a scriptPubKey directly (in hex form) using
importaddress, outputs sending to it would be treated as change, as the
corresponding CTxDestination was not added to the address book.

Fix this by trying to detect scriptPubKeys that are in fact convertible to a
CTxDestination and add them anyway. Add a warning to the RPC help to warn
against importing raw non-standard scripts.
2018-01-08 21:48:12 +03:00
Pedro Branco
8e2f81bb7f Prevent multiple calls to ExtractDestination 2018-01-08 21:47:33 +03:00
Jonas Schnelli
22bebdaacd [Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds 2018-01-08 21:46:56 +03:00
MarcoFalke
2b9c31046b [wallet] rpc: Drop misleading option in importprunedfunds 2018-01-08 21:45:39 +03:00
instagibbs
8bca020397 Added companion removeprunedfunds call. 2018-01-08 21:36:30 +03:00
instagibbs
c37ac7db87 Add importprunedfunds rpc call 2018-01-08 21:36:08 +03:00
Patrick Strateman
db3b5d964a Move BackupWallet to CWallet::BackupWallet 2018-01-08 21:31:59 +03:00
lateminer
261efcf69a Merge remote-tracking branch 'janko33bd/Blackcoin-Lore' into wallet-updates-0.13 2018-01-08 19:45:45 +03:00
janko33bd
26cbe6bc72 Merge pull request #16 from lateminer/wallet-mod
[Wallet] refactor wallet/init interaction
2018-01-07 21:02:54 +01:00
lateminer
af7f906c74 Remove unused constants 2018-01-07 15:52:28 +03:00
lateminer
b808896d4c [Wallet] refactor wallet/init interaction
25340b7cd5
2018-01-07 15:29:36 +03:00
Jonas Schnelli
aefae306e5 [Wallet] Bugfix: FRT: don't terminate when keypool is empty 2018-01-07 13:45:21 +03:00
Gregory Maxwell
c1a0128033 Make RelayWalletTransaction attempt to AcceptToMemoryPool. 2018-01-07 13:44:47 +03:00
crowning-
40ebee8dec CDB: fix debug output
It doesn't really help to clear a variable before printing it to the debug log.
2018-01-07 13:38:33 +03:00
Jonas Schnelli
ea219cd59d [Wallet] Trivial cleanup of HD wallet changes 2018-01-07 13:37:11 +03:00
Wladimir J. van der Laan
77ea5eb519 wallet: Revert input selection post-pruning
This reverts PR #4906, "Coinselection prunes extraneous inputs from
ApproximateBestSubset".

Apparently the previous behavior of slightly over-estimating the set of
inputs was useful in cleaning up UTXOs.

See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
2018-01-07 13:36:04 +03:00
Patrick Strateman
e94e583f48 Improve CWallet API with new GetAccountPubkey function.
Remove one more caller that is passing CWalletDB.
2018-01-07 13:33:46 +03:00
Patrick Strateman
acf8c3d9ce Improve CWallet API with new AccountMove function. 2018-01-07 13:33:24 +03:00
Pieter Wuille
f9d2d353ff Always require OS randomness when generating secret keys 2018-01-07 13:27:51 +03:00
Patrick Strateman
ee0b4321ff Move GetAccountBalance from rpcwallet.cpp into CWallet::GetAccountBalance 2018-01-07 13:22:45 +03:00
João Barbosa
26f8d58b92 Fix lockunspents help message 2018-01-07 13:16:18 +03:00
João Barbosa
395af2c291 Prevent multiple calls to CWallet::AvailableCoins 2018-01-07 13:15:46 +03:00