Commit graph

7641 commits

Author SHA1 Message Date
Wladimir J. van der Laan
d9594bfe0c
Merge #7514: Fix IsInitialBlockDownload for testnet
8aa7226 Fix IsInitialBlockDownload to play nice with testnet (jmacwhyte)
2016-04-28 12:55:35 +02:00
Wladimir J. van der Laan
574ddc63d6
Merge #7939: qt: Make it possible to show details for multiple transactions
f135e3c qt: Add transaction hash to details window title (Wladimir J. van der Laan)
17a6a21 qt: Make it possible to show details for multiple transactions (Wladimir J. van der Laan)
2016-04-28 12:21:29 +02:00
21E14
c7aac2d557 Deprecating the remaining LogPrintf dependencies that were made obsolete in PR #7459. 2016-04-27 22:36:45 -04:00
Kaz Wesley
f4ac02ee7c fix race that could fail to persist a ban
DumpBanList currently does this:
  - with lock: take a copy of the banmap
  - perform I/O (write out the banmap)
  - with lock: mark the banmap non-dirty
If a new ban is added during the I/O operation, it may never be persisted to
disk.

Reorder operations so that the data to be persisted cannot be older than the
time at which the banmap was marked non-dirty.
2016-04-27 09:41:13 -07:00
Pavel Janík
b02119e463 Remove useless argument to AlertNotify.
It is always 'true', so useless.
2016-04-27 18:04:02 +02:00
Suhas Daftuar
383fc10ebb Only use AddInventoryKnown for transactions
filterInventoryKnown is only used when relaying transactions,
so stop adding block hashes to the filter.
2016-04-27 09:57:02 -04:00
Jonas Schnelli
e59336fbf9
[bitcoin-tx] allow to set nSequence number over the in= command 2016-04-27 15:42:17 +02:00
Jonas Schnelli
a946bb6b18
[RPC] createrawtransaction: add option to set the sequence number per input 2016-04-27 15:42:14 +02:00
Andrew
f90efbfeef Create signmessagewithprivkey rpc
New rpc 'signmessagewithprivkey' which takes a private key to sign a message without using the wallet.
2016-04-27 06:43:39 -04:00
Wladimir J. van der Laan
6030625631 test: Add more thorough test for dbwrapper iterators
I made a silly mistake in a database wrapper where keys
were sorted by char instead of uint8_t. As x86 char is signed
the sorting for the block index database was messed up, resulting
in a segfault due to missing records.

Add a test to catch:
- Wrong sorting
- Seeking errors
- Iteration result not complete
2016-04-27 11:11:36 +02:00
Wladimir J. van der Laan
84c13e759d chain: Add assertion in case of missing records in index db 2016-04-27 11:11:36 +02:00
Pavel Janík
61c01706cd Log invalid block hash to make debugging easier. 2016-04-26 22:22:59 +02:00
Wladimir J. van der Laan
f135e3c943 qt: Add transaction hash to details window title 2016-04-26 16:05:10 +02:00
Wladimir J. van der Laan
e26b62093a
Merge #7933: Fix OOM when deserializing UTXO entries with invalid length
1e44169 Add tests for CCoins deserialization (Pieter Wuille)
5d0434d Fix OOM bug: UTXO entries with invalid script length (Pieter Wuille)
4bf631e CDataStream::ignore Throw exception instead of assert on negative nSize. (Patrick Strateman)
4f87af6 Treat overly long scriptPubKeys as unspendable (Pieter Wuille)
f8e6fb1 Introduce constant for maximum CScript length (Pieter Wuille)
2016-04-26 13:23:05 +02:00
Kaz Wesley
719de56ab2 lock cs_main for chainActive
ActivateBestChain uses chainActive after releasing the lock; reorder operations
to move all access to synchronized object into existing LOCK(cs_main) block.
2016-04-25 18:12:30 -07:00
Kaz Wesley
efb54ba065 lock cs_main for State/Misbehaving
ProcessMessage calls State(...) and Misbehaving(...) without holding the
required lock; add LOCK(cs_main) blocks.
2016-04-25 18:06:44 -07:00
Chris Stewart
62a9abd12b Fixing comment in script_test.json test case 2016-04-25 11:08:10 -05:00
Wladimir J. van der Laan
17a6a21786 qt: Make it possible to show details for multiple transactions
A small GUI annoyance for me has always been that it's impossible to
have multiple transaction detail windows open, for example to compare
transactions.

This patch makes the window non-modal so that it is possible to open
transaction details at will.
2016-04-25 16:06:07 +02:00
Wladimir J. van der Laan
46880ed2fd
Merge #7688: List solvability in listunspent output and improve help
c3932b3 List solvability in listunspent output and improve help (Pieter Wuille)
2016-04-25 14:46:29 +02:00
Pieter Wuille
1e44169f0e Add tests for CCoins deserialization 2016-04-25 14:42:07 +02:00
Pieter Wuille
5d0434d13d Fix OOM bug: UTXO entries with invalid script length 2016-04-25 14:42:07 +02:00
Patrick Strateman
4bf631e5e4 CDataStream::ignore Throw exception instead of assert on negative nSize.
Previously disk corruption would cause an assert instead of an exception.
2016-04-25 14:42:07 +02:00
Pieter Wuille
4f87af6fc7 Treat overly long scriptPubKeys as unspendable 2016-04-25 14:22:30 +02:00
Pieter Wuille
f8e6fb1800 Introduce constant for maximum CScript length 2016-04-25 14:22:30 +02:00
Wladimir J. van der Laan
f9c2ac7232
Merge #7927: Minor changes to dbwrapper to simplify support for other databases
869cf12 dbwrapper: Move `HandleError` to `dbwrapper_private` (Wladimir J. van der Laan)
b69836d dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator (Wladimir J. van der Laan)
878bf48 dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex (Wladimir J. van der Laan)
74f7b12 dbwrapper: Remove throw keywords in function signatures (Wladimir J. van der Laan)
2016-04-25 12:46:23 +02:00
Patrick Strateman
fb26bf0ea3 CAddrMan::Deserialize handle corrupt serializations better. 2016-04-24 01:30:47 -07:00
Wladimir J. van der Laan
869cf1234a dbwrapper: Move HandleError to dbwrapper_private
HandleError is implementation-specific.
2016-04-23 09:32:25 +02:00
Wladimir J. van der Laan
b69836d6ff dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator
Pass parent wrapper directly instead of obfuscation key. This
makes it possible for other databases which re-use this code
to use other properties from the database.

Add a namespace dbwrapper_private for private functions to be used
only in dbwrapper.h/cpp and dbwrapper_tests.
2016-04-23 09:32:25 +02:00
Wladimir J. van der Laan
878bf480a3 dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex
It is an unnecessary method as it is used only two times
and only internally, and the whole implementation is
HexStr(obfuscate_key).
2016-04-23 09:32:25 +02:00
Wladimir J. van der Laan
74f7b1273c dbwrapper: Remove throw keywords in function signatures
Using throw() specifications in function signatures is not only
not required in C++, it is considered deprecated for
[various reasons](https://stackoverflow.com/questions/1055387/throw-keyword-in-functions-signature).
It is not implemented by any of the common C++ compilers. The usage is
also inconsistent with the rest of the source code.
2016-04-23 09:32:25 +02:00
instagibbs
9c0bcb617b push back getaddednodeinfo dead value 2016-04-22 11:20:06 -07:00
Wladimir J. van der Laan
f59dceb44f qt: Fix out-of-tree GUI builds
Without this patch:

- When I compile the GUI from the bitcoin directory itself, it works as
  expected.

- When I build the GUI in an out-of-tree build, I cannot get it to
  select tabs. When I click, say the "Receive" tab nothing happens,
  the button selects but it doesn't switch the page. The rest - even
  the debug window - seems to work.

See full discussion here:
https://github.com/bitcoin/bitcoin/pull/7911#issuecomment-212413442

This turned out to be caused by a mismatch in the arguments to moc,
preventing it from finding `bitcoin-config.h`. Fix this by passing
`$(DEFAULT_INCLUDES)` to it, which gets set to the appropriate
path by autoconf itself.
2016-04-22 09:21:09 +02:00
Wladimir J. van der Laan
351abf9e03
Merge #7911: leveldb: integrate leveldb into our buildsystem
a4625ac leveldb: integrate leveldb into our buildsystem (Cory Fields)
2016-04-22 09:16:17 +02:00
Wladimir J. van der Laan
90653bc91d
Merge #7922: CBase58Data::SetString: cleanse the full vector
5770449 CBase58Data::SetString: cleanse the full vector (Kaz Wesley)
2016-04-22 09:04:16 +02:00
Wladimir J. van der Laan
76176823ba
Merge #7919: Fix headers announcements edge case
3a99fb2 Fix headers announcements edge case (Suhas Daftuar)
2016-04-22 08:40:22 +02:00
Wladimir J. van der Laan
0c95ebce7e
Merge #7816: [Wallet] slighly refactor GetOldestKeyPoolTime()
9f7336b [Wallet] slightly refactor GetOldestKeyPoolTime() (Jonas Schnelli)
2016-04-22 08:36:56 +02:00
Kaz Wesley
57704499be CBase58Data::SetString: cleanse the full vector
SetString seems to be passing the length of the wrong variable to
memory_cleanse, resulting in the last byte of the temporary buffer not being
securely erased.
2016-04-21 18:28:57 -07:00
Patrick Strateman
d1d7775587 Improve worst-case behavior of CScript::FindAndDelete
Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
2016-04-21 17:24:36 -07:00
Wladimir J. van der Laan
3689ac4634
Merge #7916: Explicitly pass CChainParams& to DisconnectTip()
176869f Explicitly pass CChainParams to ConnectBlock (face)
d0a6353 Pass CChainParams to DisconnectTip() (face)
764d237 Globals: Explicitly pass const CChainParams& to UpdateTip() (Jorge Timón)
2016-04-21 14:54:31 +02:00
Pieter Wuille
bafd075c5e
Merge #7913: Fix for incorrect locking in GetPubKey() (keystore.cpp)
220f950 Fix for incorrect locking in GetPubKey() (keystore.cpp) (Yuri Zhykin)
2016-04-21 13:57:07 +02:00
Pieter Wuille
7daa3adb24
Merge #7868: net: Split DNS resolving functionality out of net structures
d39f5b4 net: disable resolving from storage structures (Cory Fields)
3675699 net: resolve outside of storage structures (Cory Fields)
a98cd1f net: manually resolve dns seed sources (Cory Fields)
e9fc71e net: require lookup functions to specify all arguments (Cory Fields)
2016-04-21 13:48:13 +02:00
Gregory Maxwell
b559914753 Move bloom and feerate filtering to just prior to tx sending.
This will avoid sending more pointless INVs around updates, and
 prevents using filter updates to timetag transactions.

Also adds locking for fRelayTxes.
2016-04-21 00:33:56 +02:00
Pieter Wuille
4578215e7f Return mempool queries in dependency order 2016-04-21 00:33:56 +02:00
Pieter Wuille
ed7068302c Handle mempool requests in send loop, subject to trickle
By eliminating queued entries from the mempool response and responding only at
trickle time, this makes the mempool no longer leak transaction arrival order
information (as the mempool itself is also sorted)-- at least no more than
relay itself leaks it.
2016-04-21 00:33:56 +02:00
Pieter Wuille
dc13dcd2be Split up and optimize transaction and block inv queues 2016-04-21 00:33:51 +02:00
Suhas Daftuar
3a99fb2cb1 Fix headers announcements edge case
Previously we would assert that if every block in vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect.  However, there are
edge cases where this assumption could be violated (eg using invalidateblock /
reconsiderblock), so just check for this case and revert to inv-announcement
instead.
2016-04-20 14:19:03 -04:00
Cory Fields
d39f5b425d net: disable resolving from storage structures
CNetAddr/CService/CSubnet can no longer resolve DNS.
2016-04-20 13:08:19 -04:00
Cory Fields
367569926a net: resolve outside of storage structures
Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require
that addresses are already resolved.

This greatly simplifies async resolve logic, and makes it harder to
accidentally leak DNS queries.
2016-04-20 13:08:19 -04:00
Cory Fields
a98cd1fc86 net: manually resolve dns seed sources
Note: Some seeds aren't actually returning an IP for their name entries, so
they're being added to addrman with a source of [::].

This commit shouldn't change that behavior, for better or worse.
2016-04-20 13:07:19 -04:00
face
176869f9b3 Explicitly pass CChainParams to ConnectBlock 2016-04-20 17:05:15 +03:00
Yuri Zhykin
220f950ab1 Fix for incorrect locking in GetPubKey() (keystore.cpp) 2016-04-20 16:04:28 +03:00
Gregory Maxwell
f2d3ba7386 Eliminate TX trickle bypass, sort TX invs for privacy and priority.
Previously Bitcoin would send 1/4 of transactions out to all peers
 instantly.  This causes high overhead because it makes >80% of
 INVs size 1.  Doing so harms privacy, because it limits the
 amount of source obscurity a transaction can receive.

These randomized broadcasts also disobeyed transaction dependencies
 and required use of the orphan pool.  Because the orphan pool is
 so small this leads to poor propagation for dependent transactions.

When the bypass wasn't in effect, transactions were sent in the
 order they were received.  This avoided creating orphans but
 undermines privacy fairly significantly.

This commit:
 Eliminates the bypass. The bypass is replaced by halving the
  average delay for outbound peers.

 Sorts candidate transactions for INV by their topological
  depth then by their feerate (then hash); removing the
  information leakage and providing priority service to
  higher fee transactions.

 Limits the amount of transactions sent in a single INV to
  7tx/sec (and twice that for outbound); this limits the
  harm of low fee transaction floods, gives faster relay
  service to higher fee transactions. The 7 sounds lower
  than it really is because received advertisements need
  not be sent, and because the aggregate rate is multipled
  by the number of peers.
2016-04-20 10:26:37 +02:00
Gavin Andresen
e2a30bc9a9 Unit test for CScript::FindAndDelete 2016-04-19 13:22:45 -07:00
Patrick Strateman
c0f660c3a3 Replace c-style cast with c++ style static_cast. 2016-04-19 13:22:20 -07:00
Patrick Strateman
ec9ad5f199 Replace memcmp with std::equal in CScript::FindAndDelete
Function is stl; std::equal just makes more sense.
2016-04-19 13:22:03 -07:00
Cory Fields
a4625acbf8 leveldb: integrate leveldb into our buildsystem
leveldb's buildsystem causes us a few problems:
- breaks out-of-tree builds
- forces flags used for some tools
- limits cross builds

Rather than continuing to add wrappers around it, simply integrate it into our
build.
2016-04-19 14:37:15 -04:00
face
d0a6353dec Pass CChainParams to DisconnectTip() 2016-04-19 20:33:04 +03:00
Jorge Timón
764d237772 Globals: Explicitly pass const CChainParams& to UpdateTip() 2016-04-19 20:33:04 +03:00
Wladimir J. van der Laan
04a2937357
Merge #7787: [Moveonly] Create ui_interface.cpp
fa10ce6 Move ui_interface.cpp to libbitcoin_server_a_SOURCES (MarcoFalke)
fabbf80 [ui] Move InitError, InitWarning, AmountErrMsg (MarcoFalke)
2016-04-19 16:10:57 +02:00
MarcoFalke
fa10ce6a6d Move ui_interface.cpp to libbitcoin_server_a_SOURCES
It is only needed by bitcoind and bitcoin-qt
2016-04-19 16:07:46 +02:00
Wladimir J. van der Laan
a1eb344ba8
Merge #7762: [ZMQ] append a message sequence number to every ZMQ notification
0b25a9f [ZMQ] append a message sequence number to every ZMQ notification (Jonas Schnelli)
de821d5 [ZMQ] refactor message string (Jonas Schnelli)
2016-04-19 15:44:38 +02:00
Jonas Schnelli
0b25a9fb42
[ZMQ] append a message sequence number to every ZMQ notification 2016-04-19 15:32:11 +02:00
Wladimir J. van der Laan
187186b0fe
Merge #7905: test: move accounting_tests and rpc_wallet_tests to wallet/test
b30fb42 test: Rename wallet.dat to wallet_test.dat (Wladimir J. van der Laan)
a25a4f5 wallet_ismine.h → script/ismine.h (Wladimir J. van der Laan)
f4eae2d test: Create test fixture for wallet (Wladimir J. van der Laan)
de39c95 test: move accounting_tests and rpc_wallet_tests to wallet/test (Wladimir J. van der Laan)
2016-04-19 10:49:48 +02:00
Wladimir J. van der Laan
4205ad7ca2
Merge #7827: Speed up getchaintips.
87049e8 Speed up getchaintips. (mrbandrews)
2016-04-19 10:44:47 +02:00
Wladimir J. van der Laan
fc9e3346e6
Merge #7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)
2016-04-19 10:23:38 +02:00
mrbandrews
87049e832d Speed up getchaintips. 2016-04-18 12:10:47 -04:00
Wladimir J. van der Laan
b30fb42e49 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.
2016-04-18 15:17:08 +02:00
Wladimir J. van der Laan
a25a4f5b04 wallet_ismine.h → script/ismine.h
Removes conditional dependency of `src/test` on wallet.

Makes multisig and P2SH tests complete without wallet built-in.
2016-04-18 15:14:36 +02:00
Wladimir J. van der Laan
f4eae2d910 test: Create test fixture for wallet
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by
making the wallet tests use their own fixture.
2016-04-18 14:57:42 +02:00
Wladimir J. van der Laan
d289950180
Merge #7900: fix spelling mistake
3107c47 fix spelling mistake (Chris Moore)
2016-04-18 14:15:12 +02:00
Wladimir J. van der Laan
9eb7565cdd
Merge #7897: add missing newline
dc0693f add missing newline (Chris Moore)
2016-04-18 14:14:30 +02:00
Wladimir J. van der Laan
de39c95c24 test: move accounting_tests and rpc_wallet_tests to wallet/test
Move the two other wallet tests to where they belong.
2016-04-18 14:04:40 +02:00
Wladimir J. van der Laan
88616d2008
Merge #7848: Divergence between 32- and 64-bit when hashing >4GB affects gettxoutsetinfo
28b400f doc: update release-notes for `gettxoutsetinfo` change (Wladimir J. van der Laan)
76212bb rpc: make sure `gettxoutsetinfo` hash has txids (Wladimir J. van der Laan)
9ad1a51 crypto: bytes counts are 64 bit (Wladimir J. van der Laan)
2016-04-18 12:48:09 +02:00
Wladimir J. van der Laan
a3310b4d48 txdb: Fix assert crash in new UTXO set cursor
Remove the mistaken assumption that GetKey returning false signifies
an internal database issue. It will return false when the key cannot
be deserialized into the (char,uint256) stanza, which indicates
that the cursor has reached a different kind of key.

Fixes bug #7890 introduced in #7756.
2016-04-18 12:05:32 +02:00
Cory Fields
e9fc71e5fa net: require lookup functions to specify all arguments
To make it clear where DNS resolves are happening
2016-04-17 17:37:36 -04:00
Chris Moore
3107c475a7 fix spelling mistake 2016-04-17 00:01:49 -07:00
Chris Moore
dc0693f637 add missing newline
Without the newline I see "bein" where the two lines are concatenated:

Note that all inputs selected must be of standard form and P2SH scripts must *bein* the wallet using importaddress or addmultisigaddress (to calculate fees).
2016-04-16 13:42:28 -07:00
Chris Moore
fc95f6ecb6 fix typo in help text
'in which the transaction is included in'
2016-04-16 13:35:42 -07:00
Kaz Wesley
a7af72a697 prevector::swap: fix (unreached) data corruption
swap was using an incorrect condition to determine when to apply an optimization
(not swapping the full direct[] when swapping two indirect prevectors).

Rather than correct the optimization I'm removing it for simplicity. Removing
this optimization minutely improves performance in the typical (currently only)
usage of member swap(), which is swapping with a freshly value-initialized
object.
2016-04-16 08:05:11 -07:00
Kaz Wesley
4ed41a2b61 test prevector::swap
- add a swap operation to prevector tests (fails due to broken prevector::swap)
- fix 2 prevector test operation conditions that were impossible
2016-04-16 08:05:11 -07:00
Kaz Wesley
1e2c29f263 prevector: destroy elements only via erase()
Fixes a bug in which pop_back did not call the deleted item's destructor.

Using the most general erase() implementation to implement all the others
prevents similar bugs because the coupling between deallocation and destructor
invocation only needs to be maintained in one place.
Also reduces duplication of complex memmove logic.
2016-04-16 08:05:11 -07:00
Wladimir J. van der Laan
76212bbc6a rpc: make sure gettxoutsetinfo hash has txids
The key (transaction id for the following outputs) should be serialized
to the HashWriter.

This is a problem as it means different transactions in the same
position with the same outputs will potentially result in the same hash.

Fixes primary concern of #7758.
2016-04-15 18:03:05 +02:00
Wladimir J. van der Laan
99e70751f2 Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.
2016-04-15 17:48:38 +02:00
Wladimir J. van der Laan
9ad1a51857 crypto: bytes counts are 64 bit
Byte counts for SHA256, SHA512, SHA1 and RIPEMD160 must be 64 bits.
`size_t` has a different size per platform, causing divergent results
when hashing more than 4GB of data.
2016-04-15 16:44:23 +02:00
Wladimir J. van der Laan
9e47fcec17
Merge #7756: Add cursor to iterate over utxo set, use this in gettxoutsetinfo
509cb00 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (Wladimir J. van der Laan)
2016-04-15 16:43:21 +02:00
Wladimir J. van der Laan
509cb006d5 txdb: Add Cursor() method to CCoinsView to iterate over UTXO set
Add a method Cursor() to CCoinsView that returns a cursor which can be
used to iterate over the whole UTXO set.

- rpc: Change gettxoutsetinfo to use new Cursor method

- txdb: Remove GetStats method - Now that GetStats is implemented in
  terms of Cursor, remove it.
2016-04-15 16:33:05 +02:00
João Barbosa
f2d0944eb3 Add lockUnspents option to fundrawtransaction 2016-04-15 15:36:05 +02:00
João Barbosa
af4fe7fd12 Add change options to fundrawtransaction 2016-04-15 15:36:05 +02:00
João Barbosa
41e835dd50 Add strict flag to RPCTypeCheckObj
Strict flag forces type check on all object keys.
2016-04-15 14:55:52 +02:00
Jonas Schnelli
de821d56e1
[ZMQ] refactor message string 2016-04-15 13:23:16 +02:00
Wladimir J. van der Laan
64e71b3721
Merge #7856: Only send one GetAddr response per connection.
66b0724 Only send one GetAddr response per connection. (Gregory Maxwell)
2016-04-15 09:03:17 +02:00
Wladimir J. van der Laan
efc059322c
Merge #7877: Change mapRelay to store CTransactions
38c3102 Change mapRelay to store CTransactions (Pieter Wuille)
2016-04-15 08:59:40 +02:00
Wladimir J. van der Laan
48c5adfbce
Merge #6215: add bip32 pub key serialization
90604f1 add bip32 pubkey serialization (Jonas Schnelli)
2016-04-15 07:59:38 +02:00
Jonas Schnelli
90604f16af
add bip32 pubkey serialization
CExtPubKey should be serializable like CPubKey
2016-04-14 20:56:33 +02:00
MarcoFalke
fa7abe0a00 [test] bctest.py: Revert faa41ee 2016-04-14 19:39:53 +02:00
Wladimir J. van der Laan
e6a4d48a9b
Merge #7874: Improve AlreadyHave
c6cb6f7 Avoid unnecessary database access for unknown transactions (Alex Morcos)
2016-04-14 17:54:42 +02:00
Wladimir J. van der Laan
6ef5e000a2
Merge #7853: [qa] py2: Unfiddle strings into bytes explicitly
faa41ee [qa] py2: Unfiddle strings into bytes explicitly (MarcoFalke)
2016-04-14 17:40:31 +02:00
Wladimir J. van der Laan
430fffefaa
Merge #7812: Tiny refactor of IsRBFOptIn, avoid exception
4f7c959 Refactor IsRBFOptIn, avoid exception (Jonas Schnelli)
2016-04-14 16:35:02 +02:00
Pieter Wuille
38c310299c Change mapRelay to store CTransactions 2016-04-14 16:24:56 +02:00
Wladimir J. van der Laan
d97101e5a8
Merge #7842: RPC: do not print minping time in getpeerinfo when no ping received yet
62a6486 RPC: do not print ping info in getpeerinfo when no ping received yet, fix help (Pavel Janík)
2016-04-14 16:09:53 +02:00
Wladimir J. van der Laan
491171f929
Merge #7846: Clean up lockorder data of destroyed mutexes
5eeb913 Clean up lockorder data of destroyed mutexes (Pieter Wuille)
2016-04-14 15:47:08 +02:00
Wladimir J. van der Laan
97d0b9889f
Merge #7862: Use txid as key in mapAlreadyAskedFor
7e91f63 Use txid as key in mapAlreadyAskedFor (Suhas Daftuar)
2016-04-14 14:55:01 +02:00
Wladimir J. van der Laan
ab8586e667
Merge #7849: tests: add varints_bitpatterns test
4521f00 tests: add varints_bitpatterns test (Wladimir J. van der Laan)
2016-04-14 14:46:13 +02:00
Wladimir J. van der Laan
229a17ca91
Merge #7850: Removed call to TryCreateDirectory from GetDefaultDataDir in src/util.cpp.
41dbc48 Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp`. (Alexander Regueiro)
2016-04-14 13:38:49 +02:00
Wladimir J. van der Laan
3911a0a1b7
Merge #7818: Refactor script tests
dde46d3 Merge script_valid and script_invalid tests (Pieter Wuille)
009b503 Get rid of expect in script_tests as it's implied by scripterror (Pieter Wuille)
76da761 Make script_error a mandatory 4th field for script_tests (Pieter Wuille)
269281b Fix some misconstructed tests (Pieter Wuille)
d03e466 Fix formatting of NOPs for generated script tests (Pieter Wuille)
c7c6641 Fix JSON pretty printing in script_tests (Pieter Wuille)
2016-04-14 13:27:41 +02:00
Wladimir J. van der Laan
72c54e3883
Merge #7863: getblockchaininfo: make bip9_softforks an object, not an array.
d12760b rpc-tests: handle KeyError nicely in test_framework.py (Rusty Russell)
85c807c getblockchaininfo: make bip9_softforks an object, not an array. (Rusty Russell)
2016-04-14 12:14:42 +02:00
Wladimir J. van der Laan
536b75e946
Merge #7796: [amount] Add support for negative fee rates
facf5a4 [amount] tests: Fix off-by-one mistake (MarcoFalke)
fa2da2c [amount] Add support for negative fee rates (MarcoFalke)
11114a6 [amount] test negative fee rates and full constructor (MarcoFalke)
2016-04-14 12:07:52 +02:00
Alex Morcos
c6cb6f7d4c Avoid unnecessary database access for unknown transactions 2016-04-13 16:02:46 -04:00
Rusty Russell
85c807c9ea getblockchaininfo: make bip9_softforks an object, not an array.
We can't change "softforks", but it seems far more logical to use tags
in an object rather than using an "id" field in an array.

For example, to get the csv status before, you need to iterate the
array to find the entry with 'id' field equal to "csv":

   jq '.bip9_softforks | map(select(.id == "csv"))[] | .status'

Now:
   jq '.bip9_softforks.csv.status'

There is no issue with fork names being incompatible with JSON tags,
since we're selecting them ourselves.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-04-13 16:53:52 +09:30
Alexander Regueiro
41dbc4849e Removed call to TryCreateDirectory from GetDefaultDataDir in src/util.cpp.
See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728.
Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.
2016-04-13 00:11:47 +01:00
Pieter Wuille
514993554c
Merge #7828: Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage()
bf477bc Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() (Jorge Timón)
2016-04-12 15:51:16 +02:00
Suhas Daftuar
7e91f632c7 Use txid as key in mapAlreadyAskedFor
Previously we used the CInv that would be sent to the peer announcing the
transaction as the key, but using the txid instead allows us to decouple the
p2p layer from the application logic (which relies on this map to avoid
duplicate tx requests).
2016-04-11 15:58:01 -04:00
Gregory Maxwell
66b07247a7 Only send one GetAddr response per connection.
This conserves resources from abusive peers that just send
 getaddr in a loop. Also makes correlating addr messages
 against INVs less effective.
2016-04-11 01:09:34 +00:00
MarcoFalke
faa41ee204 [qa] py2: Unfiddle strings into bytes explicitly 2016-04-10 20:35:57 +02:00
Pieter Wuille
5eeb913d6c Clean up lockorder data of destroyed mutexes
The lockorder potential deadlock detection works by remembering for each
lock A that is acquired while holding another B the pair (A,B), and
triggering a warning when (B,A) already exists in the table.

A and B in the above text are represented by pointers to the CCriticalSection
object that is acquired. This does mean however that we need to clean up the
table entries that refer to any critical section which is destroyed, as it
memory address can potentially be used for another unrelated lock in the future.

Implement this clean up by remembering not only the pairs in forward direction,
but also backward direction. This allows for fast iteration over all pairs that
use a deleted CCriticalSection in either the first or the second position.
2016-04-10 14:27:10 +02:00
MarcoFalke
facf5a4947 [amount] tests: Fix off-by-one mistake 2016-04-09 15:28:22 +02:00
Wladimir J. van der Laan
065c6b443f
Merge #7786: Doc: Update isStandardTx comment
03c77fd Doc: Update isStandardTx comment (Matthew English)
2016-04-09 12:13:21 +02:00
Pavel Janík
62a6486058 RPC: do not print ping info in getpeerinfo when no ping received yet, fix help 2016-04-09 09:51:57 +02:00
Wladimir J. van der Laan
4521f005a1 tests: add varints_bitpatterns test
The current tests for varint only check that
serialization-deserialization is a roundtrip. That is a useful test, but
it is also good to check for some exact bit patterns, to prevent a code
change that changes the serialization format from going undetected.

As the varint functions are templated, also check with different types.
2016-04-09 09:17:51 +02:00
Matthew English
03c77fdc14 Doc: Update isStandardTx comment 2016-04-08 23:22:39 +02:00
MarcoFalke
fa2da2cb60 [amount] Add support for negative fee rates
Currently negative fee rates are not supported on archs of 64-bit or
more
2016-04-08 19:59:53 +02:00
MarcoFalke
11114a69c8 [amount] test negative fee rates and full constructor 2016-04-08 19:59:44 +02:00
Wladimir J. van der Laan
0afac87e81
Merge #7835: Version 2 transactions remain non-standard until CSV activates
da5fdbb Test relay of version 2 transactions (Suhas Daftuar)
5cb1d8a Tests: move get_bip9_status to util.py (Suhas Daftuar)
e4ba9f6 Version 2 transactions remain non-standard until CSV activates (Suhas Daftuar)
2016-04-08 14:17:54 +02:00
Wladimir J. van der Laan
232592a71f
Merge #7570: Net: Add IPv6 Link-Local Address Support
eda3d92 Net: Add IPv6 Link-Local Address Support (mruddy)
2016-04-08 14:12:54 +02:00
Suhas Daftuar
e4ba9f6b04 Version 2 transactions remain non-standard until CSV activates
Before activation, such transactions might not be mined, so don't
allow into the mempool.
2016-04-07 14:33:08 -04:00
instagibbs
f8536a62c3 Corrected values 2016-04-07 10:14:49 -04:00
instagibbs
617deeb06e Gave miner test values constants for less error-prone values. 2016-04-07 10:14:44 -04:00
Wladimir J. van der Laan
62b9a557fc Reduce block timeout to 10 minutes
Now that #7804 fixed the timeout handling, reduce the block timeout from
20 minutes to 10 minutes. 20 minutes is overkill.
2016-04-07 13:22:27 +02:00
Wladimir J. van der Laan
1ddf0cee67
Merge #7804: Track block download times per individual block
0e24bbf Self check after the last peer is removed (Pieter Wuille)
2d1d658 Track block download times per individual block (Pieter Wuille)
2016-04-07 13:07:11 +02:00
Pieter Wuille
0e24bbf679 Self check after the last peer is removed 2016-04-07 12:13:10 +02:00
Pieter Wuille
2d1d6581ec Track block download times per individual block
Currently, we're keeping a timeout for each requested block, starting
from when it is requested, with a correction factor for the number of
blocks in the queue.

That's unnecessarily complicated and inaccurate.

As peers process block requests in order, we can make the timeout for each
block start counting only when all previous ones have been received, and
have a correction based on the number of peers, rather than the total number
of blocks.
2016-04-07 12:13:10 +02:00
Jorge Timón
bf477bcc79 Trivial: Globals: Explicitly pass const CChainParams& to ProcessMessage() 2016-04-06 16:00:25 +02:00
Jonas Schnelli
9f7336b457
[Wallet] slightly refactor GetOldestKeyPoolTime() 2016-04-06 11:06:25 +02:00
Jonas Schnelli
4f7c959af1
Refactor IsRBFOptIn, avoid exception 2016-04-06 10:59:03 +02:00
Wladimir J. van der Laan
07398e8e9d init: allow shutdown during 'Activating best chain...'
Two-line patch to make it possible to shut down bitcoind cleanly during
the initial ActivateBestChain.

Fixes #6459 (among other complaints).

To reproduce:

- shutdown bitcoind
- copy chainstate
- start bitcoind
- let the chain sync a bit
- shutdown bitcoind
- copy back old chainstate
- start bitcoind
- bitcoind will catch up with all blocks during Init()

(the `boost::this_thread::interruption_point` / `ShutdownRequested()`
dance is ugly, this should be refactored all over bitcoind at some point
when moving from boost::threads to c++11 threads, but it works...)
2016-04-06 10:33:19 +02:00
mruddy
eda3d92489 Net: Add IPv6 Link-Local Address Support 2016-04-05 22:26:38 +00:00
Wladimir J. van der Laan
1b2460bd58
Merge #7793: [doxygen] Fix member comments
fada0c4 [doc] Fix doxygen comments for members (MarcoFalke)
2016-04-05 17:49:47 +02:00
Wladimir J. van der Laan
4dc1b3a296
Merge #7788: Use relative paths instead of absolute paths in protoc calls
0087f26 Use relative paths instead of absolute paths (Pavel Janík)
2016-04-05 17:38:41 +02:00
Wladimir J. van der Laan
f20d42ed2b UpdateTip: log only one line at most per block
Avoid logging two or more lines per block in UpdateTip by
adding the warning into the UpdateTip log message.
2016-04-05 16:38:01 +02:00
Pieter Wuille
dde46d3ae1 Merge script_valid and script_invalid tests 2016-04-05 16:11:47 +02:00
Pieter Wuille
009b503792 Get rid of expect in script_tests as it's implied by scripterror 2016-04-05 15:50:17 +02:00
Pieter Wuille
76da761351 Make script_error a mandatory 4th field for script_tests 2016-04-05 15:46:16 +02:00
Pieter Wuille
269281b7cc Fix some misconstructed tests
They claimed to be testing P2SH scripts with non-push scriptSigs, but
1) they were not enabling P2SH
2) they have push-only scriptSigs

Fix this, and add a few more related cases.
2016-04-05 14:54:37 +02:00
Pieter Wuille
d03e46625a Fix formatting of NOPs for generated script tests 2016-04-05 14:54:37 +02:00
Pieter Wuille
c7c664191f Fix JSON pretty printing in script_tests 2016-04-05 14:54:33 +02:00
mruddy
92107d574d RPC: add versionHex in getblock and getblockheader JSON results; expand data in getblockchaininfo bip9_softforks field. 2016-04-04 22:21:00 +00:00
Pavel Janík
0087f26848 Use relative paths instead of absolute paths 2016-04-04 19:56:59 +02:00
Jonas Schnelli
a9149688f8
Merge #7707: [RPC][QT] UI support for abandoned transactions
8efed3b [Qt] Support for abandoned/abandoning transactions (Jonas Schnelli)
2016-04-04 09:58:33 +02:00
Jonas Schnelli
8efed3bc93
[Qt] Support for abandoned/abandoning transactions 2016-04-04 09:25:34 +02:00
mruddy
60361ca481 RPC: fix generatetoaddress failing to parse address and add unit test 2016-04-03 14:30:00 +00:00
MarcoFalke
fada0c422c [doc] Fix doxygen comments for members 2016-04-03 11:58:01 +02:00
MarcoFalke
fabbf80f2f [ui] Move InitError, InitWarning, AmountErrMsg 2016-04-02 15:26:21 +02:00
Wladimir J. van der Laan
30c2dd8d05
Merge #7691: [Wallet] refactor wallet/init interaction
25340b7 [Wallet] refactor wallet/init interaction (Jonas Schnelli)
2016-04-02 11:07:39 +02:00
paveljanik
a22bde9449 Fix typo: Optimizaton -> Optimization 2016-04-01 21:31:48 +02:00
Jonas Schnelli
6383268893
Merge #7772: Clear the input line after activating autocomplete
ae2156f Clear the input line after activating autocomplete (Pavel Janík)
2016-03-31 14:14:04 +02:00
Wladimir J. van der Laan
3081fb9a31
Merge #7763: Put hex-encoded version in UpdateTip
eff736e Reformat version in UpdateTip and other messages (Pieter Wuille)
2016-03-31 13:24:50 +02:00
Pieter Wuille
eff736e55e Reformat version in UpdateTip and other messages
Also remove the hardly-readable nBits from UpdateTip's log message.
2016-03-31 12:28:34 +02:00
Wladimir J. van der Laan
16555b658f
Merge #7766: rpc: Register calls where they are defined
fb8a8cf rpc: Register calls where they are defined (Wladimir J. van der Laan)
2016-03-31 10:55:15 +02:00
Wladimir J. van der Laan
fb8a8cf2e6 rpc: Register calls where they are defined
Split out methods to every module, apart from 'help' and 'stop' which
are implemented in rpcserver.cpp itself.

- This makes it easier to add or remove RPC commands - no longer everything that includes
    rpcserver.h has to be rebuilt when there's a change there.
- Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions.
- Removes most of the bitcoin-specific code from rpcserver.cpp and .h.

Continues #7307 for the non-wallet.
2016-03-31 10:48:32 +02:00
Pavel Janík
ae2156f123 Clear the input line after activating autocomplete 2016-03-30 20:26:10 +02:00
Wladimir J. van der Laan
e8a8f3d4b2
Merge #7648: BIP9 versionbits softfork for BIP68, BIP112 and BIP113
71527a0 Test of BIP9 fork activation of mtp, csv, sequence_lock (NicolasDorier)
19d73d5 Add RPC test for BIP 68/112/113 soft fork. (Alex Morcos)
12c89c9 Policy: allow transaction version 2 relay policy. (BtcDrak)
02c2435 Soft fork logic for BIP68 (BtcDrak)
478fba6 Soft fork logic for BIP113 (BtcDrak)
65751a3 Add CHECKSEQUENCEVERIFY softfork through BIP9 (Pieter Wuille)
2016-03-30 18:59:39 +02:00
Wladimir J. van der Laan
60db51dcb2
Merge #7761: [Qt] remove trailing output-index from transaction-id
7d5e31a [Qt] remove trailing output-index from transaction-id (Jonas Schnelli)
2016-03-30 15:44:43 +02:00
Wladimir J. van der Laan
352fd57729
Merge #7573: P2P: add maxtimeadjustment command line option
e1523ce P2P: add maxtimeadjustment command line option (mruddy)
2016-03-30 09:31:51 +02:00
Wladimir J. van der Laan
5131005e5b
Merge #7723: build: python 3 compatibility
18f05c7 build: python 3 compatibility (Wladimir J. van der Laan)
2016-03-29 17:22:46 +02:00
Wladimir J. van der Laan
18f05c765c build: python 3 compatibility
Ubuntu 16.04 "xenial xerus" does not come with Python 2.x by default.
It is possible to install a python-2.7 package, but this has its own
problem: no `python` or `python2` symlink (see #7717).

This fixes the following scripts to work with python 3:
- `make check` (bctest,py, bitcoin-util-test.py)
- `make translate` (extract_strings_qt.py)
- `make symbols-check` (symbol-check.py)
- `make security-check` (security-check.py)

Explicitly call the python commands using $(PYTHON) instead
of relying on the interpreter line at the top of the scripts.
2016-03-29 17:20:16 +02:00
mruddy
e1523cee58 P2P: add maxtimeadjustment command line option 2016-03-29 14:40:00 +00:00
Jonas Schnelli
7d5e31a82b
[Qt] remove trailing output-index from transaction-id
The trailing output-index leads to cases where the user can't look-up the transaction ID in various systems.
2016-03-29 11:23:44 +02:00
Wladimir J. van der Laan
b35a591793
Merge #7558: [RPC] Add import/removeprunedfunds rpc call
f1bb13c Added companion removeprunedfunds call. (instagibbs)
7eb7029 Add importprunedfunds rpc call (instagibbs)
2016-03-29 11:15:02 +02:00
Wladimir J. van der Laan
2676e12016
Merge #7742: [Wallet][RPC] add missing abandon status documentation
cef8bdf [Wallet][RPC] add missing abandon status documentation (Jonas Schnelli)
2016-03-29 11:10:57 +02:00
Jonas Schnelli
cef8bdf5d7
[Wallet][RPC] add missing abandon status documentation 2016-03-29 08:43:08 +02:00
Wladimir J. van der Laan
0b98dd7939
Merge #7732: [Qt] Debug window: replace "Build date" with "Datadir"
fc737d1 [Qt] remove unused formatBuildDate method (Jonas Schnelli)
4856f1d [Qt] Debug window: replace "Build date" with "Datadir" (Jonas Schnelli)
2016-03-25 11:21:53 +01:00
Jonas Schnelli
fc737d127f
[Qt] remove unused formatBuildDate method 2016-03-24 21:48:45 +01:00
Wladimir J. van der Laan
b88e0b0c61
Merge #7506: Use CCoinControl selection in CWallet::FundTransaction
d6cc6a1 Use CCoinControl selection in CWallet::FundTransaction (João Barbosa)
2016-03-24 14:59:51 +01:00
João Barbosa
df9e9233dc Fix lockunspents help message 2016-03-23 15:44:41 +00:00
Jonas Schnelli
263de3d1c8
[Wallet][RPC] add abandoned status to listtransactions 2016-03-23 15:49:53 +01:00
instagibbs
f1bb13c93d Added companion removeprunedfunds call. 2016-03-23 10:40:38 -04:00
instagibbs
7eb702954e Add importprunedfunds rpc call 2016-03-23 10:40:38 -04:00
Wladimir J. van der Laan
3bdc583b3f
Merge #7715: Fix calculation of balances and available coins.
68d4282 Fix calculation of balances and available coins. (Alex Morcos)
2016-03-23 15:09:02 +01:00
Wladimir J. van der Laan
e2ebd259fb
Merge #7671: [RPC] Add generatetoaddress rpc to mine to an address
d5c5c71 RPC tests for generatetoaddress (Andrew C)
fe00ca7 Create generatetoaddress rpc (Andrew C)
2016-03-23 13:24:53 +01:00
João Barbosa
bb16c8894b Prevent multiple calls to CWallet::AvailableCoins 2016-03-22 08:43:37 +00:00
Jonas Schnelli
4856f1d671
[Qt] Debug window: replace "Build date" with "Datadir"
The build date does only makes sense for custom/self-compiled bitcoin-core versions because we are using static build-dates for our deterministic release builds.
Having a quick option to get the current datadir is much more valuable for debug purposes.
2016-03-22 08:40:10 +01:00
Jonas Schnelli
25340b7cd5
[Wallet] refactor wallet/init interaction 2016-03-22 08:20:59 +01:00
Alex Morcos
9e072a6e66 Implement "feefilter" P2P message.
The "feefilter" p2p message is used to inform other nodes of your mempool min fee which is the feerate that any new transaction must meet to be accepted to your mempool.  This will allow them to filter invs to you according to this feerate.
2016-03-21 10:46:25 -04:00
Andrew C
fe00ca758a Create generatetoaddress rpc
Creates the generatetoaddress rpc which is virtually identical to the generate rpc except that it takes an argument for the address to mine to. It does not rely on wallet functionality.

The mining code shared by generate and generatetoaddress has been moved to another method to reduce duplication.
2016-03-21 09:58:40 -04:00
Wladimir J. van der Laan
29b2be6ad7
Merge #7692: Remove p2p alert system
cfd519e Add release note documentation (BtcDrak)
6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin)
ad72104 Formatting (BtcDrak)
1b77471 Remove alert keys (BtcDrak)
01fdfef Remove `-alerts` option (BtcDrak)
9206634 Update alert notification and GUI (BtcDrak)
bbb9d1d Remove p2p alert handling (BtcDrak)
2016-03-21 13:41:05 +01:00
Wladimir J. van der Laan
9af69fa7e7
Merge #7726: Correct importaddress help reference to importpubkey
c5825d2 Correct importaddress help reference to importpubkey (Denis Lukianov)
2016-03-21 12:51:32 +01:00
Wladimir J. van der Laan
3c27067dd2
Merge #7712: Improve COutPoint less operator
0f17692 Improve COutPoint less operator (João Barbosa)
2016-03-21 12:50:47 +01:00
Wladimir J. van der Laan
9426632cb5
Merge #7708: De-neuter NODE_BLOOM
c90036f Always disconnect old nodes which request filtered connections. (Patrick Strateman)
2016-03-21 12:44:19 +01:00
Wladimir J. van der Laan
ddfd79659e
Merge #7705: [amount] Add tests and make GetFee() monotonic
fad13b1 [amount] Preempt issues with negative fee rates (MarcoFalke)
faf756a [amount] Make GetFee() monotonic (MarcoFalke)
fab6880 [qa] Add amount tests (MarcoFalke)
2016-03-21 12:40:31 +01:00
Wladimir J. van der Laan
7b832d286b
Merge #7656: Improve EncodeBase58 performance
3252208 Improve EncodeBase58 performance (João Barbosa)
2016-03-21 12:03:59 +01:00
Denis Lukianov
c5825d2d73 Correct importaddress help reference to importpubkey 2016-03-21 03:16:19 +00:00
MarcoFalke
fad13b1612 [amount] Preempt issues with negative fee rates 2016-03-19 15:15:56 +01:00
Patrick Strateman
c90036f664 Always disconnect old nodes which request filtered connections. 2016-03-18 21:26:49 -07:00
Thomas Kerin
6601ce508e protocol.h/cpp: Removes NetMsgType::ALERT 2016-03-18 19:55:16 +00:00
BtcDrak
ad7210408c Formatting 2016-03-18 19:55:16 +00:00
BtcDrak
1b77471bd6 Remove alert keys 2016-03-18 19:55:16 +00:00
BtcDrak
01fdfeffc4 Remove -alerts option 2016-03-18 19:33:59 +00:00
BtcDrak
92066344fd Update alert notification and GUI 2016-03-18 19:33:59 +00:00
BtcDrak
bbb9d1d123 Remove p2p alert handling 2016-03-18 19:33:59 +00:00
Alex Morcos
68d4282774 Fix calculation of balances and available coins.
No longer consider coins which aren't in our mempool.

Add test for regression in abandonconflict.py
2016-03-18 09:56:30 -04:00
BtcDrak
12c89c9185 Policy: allow transaction version 2 relay policy.
This commit introduces a way to gracefully bump the default
transaction version in a two step process.
2016-03-18 08:09:06 +00:00
BtcDrak
02c2435802 Soft fork logic for BIP68 2016-03-18 08:09:06 +00:00
BtcDrak
478fba6d52 Soft fork logic for BIP113 2016-03-18 08:09:06 +00:00
Pieter Wuille
65751a3cf2 Add CHECKSEQUENCEVERIFY softfork through BIP9 2016-03-18 08:09:06 +00:00
João Barbosa
0f176927f8 Improve COutPoint less operator 2016-03-18 08:03:55 +00:00
Wladimir J. van der Laan
73b7eb501e
Merge #7575: Minimal BIP9 implementation
8c74ced RPC test for BIP9 warning logic (Suhas Daftuar)
7870deb Test versionbits deployments (Suhas Daftuar)
532cbb2 Add testing of ComputeBlockVersion (Suhas Daftuar)
d23f6c6 Softfork status report in RPC (Pieter Wuille)
732e774 Versionbits tests (Pieter Wuille)
6851107 BIP9 Implementation (Pieter Wuille)
2016-03-18 08:50:43 +01:00
MarcoFalke
faf756ae4e [amount] Make GetFee() monotonic
This reverts the hard-to-read and buggy code introduced in
d88af56011 and adds documentation
2016-03-17 17:00:45 +01:00
MarcoFalke
fab6880494 [qa] Add amount tests 2016-03-17 16:59:37 +01:00
Wladimir J. van der Laan
f034bced26
Merge #7686: [qt] Remove 0-fee from send dialog
fae8467 [qt] Remove unneeded "fSendFreeTransactions" check (MarcoFalke)
fa48bb3 [qt] Remove 0-fee from send dialog (MarcoFalke)
2016-03-17 16:21:56 +01:00
MarcoFalke
fae8467d41 [qt] Remove unneeded "fSendFreeTransactions" check 2016-03-17 14:48:12 +01:00
Wladimir J. van der Laan
01f4267623
Merge #7594: Mempool: Add tracking of ancestor packages
ce019bf Check all ancestor state in CTxMemPool::check() (Suhas Daftuar)
e2eeb5d Add ancestor feerate index to mempool (Suhas Daftuar)
72abd2c Add ancestor tracking to mempool (Suhas Daftuar)
76a7632 Remove work limit in UpdateForDescendants() (Suhas Daftuar)
5de2baa Rename CTxMemPool::remove -> removeRecursive (Suhas Daftuar)
7659438 CTxMemPool::removeForBlock now uses RemoveStaged (Suhas Daftuar)
2016-03-17 13:33:54 +01:00
Wladimir J. van der Laan
14d6324a24
Merge #7187: Keep reorgs fast for SequenceLocks checks
982670c Add LockPoints (Alex Morcos)
2016-03-16 21:20:04 +01:00
Alex Morcos
982670c333 Add LockPoints
Obtain LockPoints to store in CTxMemPoolEntry and during a reorg, evaluate whether they are still valid and if not, recalculate them.
2016-03-16 16:11:46 -04:00
Wladimir J. van der Laan
3d0dfdbf9f
Merge #7684: [qa] Extend tests
fad8cfb [qa] mininode: Add and use CONSTs (MarcoFalke)
fa8cd46 [qa] Move create_tx() to util.py (MarcoFalke)
fad7dc8 [qa] wallet: speed up tests (MarcoFalke)
fa3a81a [tests] Extend util_ParseMoney test case (MarcoFalke)
2016-03-16 17:32:05 +01:00
Suhas Daftuar
7870debceb Test versionbits deployments 2016-03-15 16:54:39 +01:00
Suhas Daftuar
532cbb22b5 Add testing of ComputeBlockVersion 2016-03-15 16:54:39 +01:00
Pieter Wuille
d23f6c6a0d Softfork status report in RPC 2016-03-15 16:54:38 +01:00
Pieter Wuille
732e774c06 Versionbits tests 2016-03-15 16:54:38 +01:00
Pieter Wuille
6851107b3a BIP9 Implementation
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and
based on code by Jorge Timon.
2016-03-15 16:54:38 +01:00
Wladimir J. van der Laan
a6a860796a
Merge #7621: Fixes ZMQ startup with bad arguments.
0040118 Fixes ZMQ startup with bad arguments. (mrbandrews)
2016-03-15 09:29:58 +01:00
Pieter Wuille
c3932b3270 List solvability in listunspent output and improve help 2016-03-14 19:22:11 +01:00
MarcoFalke
fa48bb3148 [qt] Remove 0-fee from send dialog 2016-03-14 18:32:09 +01:00
Suhas Daftuar
ce019bf90f Check all ancestor state in CTxMemPool::check() 2016-03-14 12:13:34 -04:00
Suhas Daftuar
e2eeb5dda7 Add ancestor feerate index to mempool 2016-03-14 12:13:34 -04:00
Suhas Daftuar
72abd2ce3c Add ancestor tracking to mempool
This implements caching of ancestor state to each mempool entry, similar to
descendant tracking, but also including caching sigops-with-ancestors (as that
metric will be helpful to future code that implements better transaction
selection in CreatenewBlock).
2016-03-14 12:13:33 -04:00
Suhas Daftuar
76a76321d2 Remove work limit in UpdateForDescendants()
The work limit served to prevent the descendant walking algorithm from doing
too much work by marking the parent transaction as dirty.  However to implement
ancestor tracking, it's not possible to similarly mark those descendant
transactions as dirty without having to calculate them to begin with.

This commit removes the work limit altogether.  With appropriate
chain limits (-limitdescendantcount) the concern about doing too much
work inside this function should be mitigated.
2016-03-14 12:13:31 -04:00
Suhas Daftuar
5de2baa138 Rename CTxMemPool::remove -> removeRecursive
remove is no longer called non-recursively, so simplify the logic
and eliminate an unnecessary parameter
2016-03-14 12:11:09 -04:00
Suhas Daftuar
7659438a63 CTxMemPool::removeForBlock now uses RemoveStaged 2016-03-14 12:11:08 -04:00
Jonas Schnelli
3d7e97376a
Fix torcontrol.cpp unused private field warning 2016-03-14 16:07:42 +01:00
MarcoFalke
fa3a81af18 [tests] Extend util_ParseMoney test case 2016-03-14 15:49:33 +01:00
Wladimir J. van der Laan
0735c0ca7c
Merge #7608: [wallet] Move hardcoded file name out of log messages
fa19b18 [wallet] Move hardcoded file name out of log messages (MarcoFalke)
2016-03-14 13:56:23 +01:00
MarcoFalke
fa19b18c63 [wallet] Move hardcoded file name out of log messages 2016-03-14 13:54:05 +01:00
Wladimir J. van der Laan
322a7a2fe0 qt: Remove reflection from about icon
While trying to find a black/white version of the Bitcoin
logo for the organization I noticed the about.png is not
entirely black - it has some reflection. Remove this to make
it the same as other icons.

Also ran the icons through `contrib/devtools/optimize-pngs.py`,
so `chevron.png` was optimized too.
2016-03-14 12:46:59 +01:00
Wladimir J. van der Laan
c9a1265754
Merge #7670: use cached block hash in blockToJSON()
a6ee0ca use cached block hash in blockToJSON() (Pavel Vasin)
2016-03-14 12:22:40 +01:00
Wladimir J. van der Laan
c87f51e55b
Merge #7663: Make the generate RPC call function for non-regtest
8a253b3 Make the generate RPC call function for non-regtest (Pieter Wuille)
2016-03-14 11:36:20 +01:00
Wladimir J. van der Laan
11c769966a
Merge #7507: Remove internal miner
8d1de43 Remove internal miner (Leviathn)
2016-03-14 11:35:41 +01:00
Wladimir J. van der Laan
5b3b5a7d71
Merge #7577: [Wallet] move "load wallet phase" to CWallet
15e6e13 [Wallet] optimize return value of InitLoadWallet() (Jonas Schnelli)
fc7c60d [Wallet] move "load wallet phase" to CWallet (Jonas Schnelli)
2016-03-14 11:34:50 +01:00
Wladimir J. van der Laan
f1ca8915bb
Merge #7517: test: script_error checking in script_invalid tests
0ecb340 test: Script_error checking in script_invalid tests (Wladimir J. van der Laan)
2317ad7 test: Re-introduce JSON pretty printing in test builder (Wladimir J. van der Laan)
b0ff857 test: Move non-generated script_invalid test to the correct place (Wladimir J. van der Laan)
2016-03-14 11:30:06 +01:00
Wladimir J. van der Laan
56d2c4e0fe
Merge #7667: Move GetTempPath() to testutil
2fdaa25 Move GetTempPath() to testutil. (Mustafa)
393b22e Add a source file for unit test utils. (Mustafa)
2016-03-14 11:26:52 +01:00
Jonas Schnelli
15e6e13624
[Wallet] optimize return value of InitLoadWallet() 2016-03-14 09:33:27 +01:00
Jonas Schnelli
b24266c207
Merge #7668: Fix history deletion bug after font size change
21e45a0 Fix history deletion bug after font change (Andrew C)
2016-03-14 09:24:39 +01:00
Jonas Schnelli
3798e5de33
Merge #7613: Add autocomplete to bitcoin-qt's console window.
ce7413f Add autocomplete to bitcoin-qt's console window. (Luv Khemani)
2016-03-14 09:20:29 +01:00
Pavel Vasin
a6ee0caa4e use cached block hash in blockToJSON() 2016-03-12 17:11:59 +03:00
Luv Khemani
ce7413fcb7 Add autocomplete to bitcoin-qt's console window.
Removed externs
Added listCommands() to CRPCTable

Move autocomplete init to RPCConsole::setClientModel()
2016-03-12 13:04:23 +08:00
Andrew C
21e45a097e Fix history deletion bug after font change
The history is no longer cleared after the font size is changed
2016-03-11 13:19:19 -05:00
Mustafa
2fdaa25529 Move GetTempPath() to testutil. 2016-03-11 15:04:05 +00:00
Jonas Schnelli
fc7c60d699
[Wallet] move "load wallet phase" to CWallet 2016-03-11 14:31:06 +01:00
Mustafa
393b22eacb Add a source file for unit test utils. 2016-03-11 12:03:45 +00:00
Wladimir J. van der Laan
86a1ec5b2c
Merge #7576: [Wallet] move wallet help string creation to CWallet
72c2651 [Wallet] move wallet help string creation to CWallet (Jonas Schnelli)
2016-03-11 08:40:37 +01:00
Wladimir J. van der Laan
9f14e5ad91
Merge #7553: Remove vfReachable and modify IsReachable to only use vfLimited.
110b62f Remove vfReachable and modify IsReachable to only use vfLimited. (Patrick Strateman)
2016-03-11 08:25:28 +01:00
Wladimir J. van der Laan
26a2a7214f
Merge #7592: mempool: Re-remove ERROR logging for mempool rejects
8fc81e0 mempool: Reduce ERROR logging for mempool rejects (Wladimir J. van der Laan)
2016-03-11 08:20:42 +01:00
Wladimir J. van der Laan
3da5d1bc2e
Merge #7637: Fix memleak in TorController [rework]
e219503 Fix memleak in TorController [rework] (Wladimir J. van der Laan)
2016-03-11 08:19:55 +01:00
Pieter Wuille
8a253b342c Make the generate RPC call function for non-regtest 2016-03-09 22:30:15 +01:00
Pieter Wuille
c8d2473e6c
Merge #7642: Avoid "Unknown command" messages when receiving getaddr on outbound c…
9988554 No "Unknown command" for getaddr command. (R E Broadley)
2016-03-09 21:52:17 +01:00
Pavel Vasin
7d2f84c72f remove unused NOBLKS_VERSION_{START,END} constants 2016-03-09 19:29:23 +03:00
João Barbosa
3252208cb1 Improve EncodeBase58 performance 2016-03-09 10:10:36 +00:00
João Barbosa
d6cc6a1830 Use CCoinControl selection in CWallet::FundTransaction 2016-03-08 15:14:47 +00:00
Jonas Schnelli
87d6562299
Merge #7628: QT: Add 'copy full transaction details' option
b51ed40 QT: Add 'copy full transaction details' option (Eric Shaw)
2016-03-08 10:15:22 +01:00
R E Broadley
9988554fc7 No "Unknown command" for getaddr command. 2016-03-08 08:49:42 +00:00
Eric Shaw
b51ed4036e QT: Add 'copy full transaction details' option
Adds feature from issue #7484

modifies the ctrl-c binding to copy full transaction details in transaction view.

Added translation
2016-03-07 19:50:57 -05:00
Jonas Schnelli
72c2651581
[Wallet] move wallet help string creation to CWallet 2016-03-05 13:27:04 -05:00
Pieter Wuille
9f33dba05c
Merge #7539: Add tags to mempool's mapTx indices
086da92 Add tags to mempool's mapTx indices (Suhas Daftuar)
2016-03-05 06:56:33 +01:00
Wladimir J. van der Laan
3368895c3b
Merge #7521: Don't resend wallet txs that aren't in our own mempool
5a2b1c0 Don't resend wallet txs that aren't in our own mempool (Alex Morcos)
2016-03-03 15:09:50 +01:00
Wladimir J. van der Laan
7f001bdf64
Merge #7605: Remove openssl info from init/log and from Qt debug window
5ecfa36 Remove openssl info from init/log and from Qt debug window (Jonas Schnelli)
2016-03-03 13:55:56 +01:00
Wladimir J. van der Laan
e219503711 Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.
2016-03-03 13:31:26 +01:00
Wladimir J. van der Laan
e5121eb951
Merge #7617: [doc/log] Fix markdown syntax and line terminate LogPrint
fa26652 Make sure LogPrintf strings are line-terminated (MarcoFalke)
fa97f95 [doc] Fix markdown (MarcoFalke)
fa06ce0 Fix doxygen comment for payTxFee (MarcoFalke)
2016-03-01 18:39:21 +01:00
MarcoFalke
fa26652459 Make sure LogPrintf strings are line-terminated 2016-03-01 14:59:30 +01:00
mrbandrews
0040118959 Fixes ZMQ startup with bad arguments. 2016-02-29 13:34:09 -05:00
Wladimir J. van der Laan
78e81b0bc5
Merge #7537: wallet: Warn on unexpected EOF while salvaging wallet
ca8fb59 wallet: Warn on unexpected EOF while salvaging wallet (Wladimir J. van der Laan)
2016-02-29 10:05:07 +01:00
MarcoFalke
fa06ce0949 Fix doxygen comment for payTxFee 2016-02-27 18:14:57 +01:00
Jonas Schnelli
5ecfa36fd0
Remove openssl info from init/log and from Qt debug window 2016-02-26 09:35:39 +01:00
Wladimir J. van der Laan
8fc81e0983 mempool: Reduce ERROR logging for mempool rejects
Continues "Make logging for validation optional" from #6519.

The idea there was to remove all ERROR logging of rejected transaction,
and move it to one message in the class 'mempoolrej' which logs the
state message (and debug info). The superfluous ERRORs in the log
"terrify" users, see for example issue #5794.

Unfortunately a lot of new logging was introduced in #6871 (RBF) and
 #7287 (misc refactoring). This pull updates that new code.
2016-02-24 19:40:29 +01:00
Wladimir J. van der Laan
8b958ab15b
Merge #7550: rpc: Input-from-stdin mode for bitcoin-cli
f22f14c doc: mention bitcoin-cli -stdin in release notes (Wladimir J. van der Laan)
92bcca3 rpc: Input-from-stdin mode for bitcoin-cli (Wladimir J. van der Laan)
2016-02-24 11:33:25 +01:00
Wladimir J. van der Laan
92bcca37ab rpc: Input-from-stdin mode for bitcoin-cli
Implements #7442 by adding an option `-stdin` which reads
additional arguments from stdin, one per line.

For example

```bash
echo -e "mysecretcode\n120" | src/bitcoin-cli -stdin walletpassphrase
echo -e "walletpassphrase\nmysecretcode\n120" | src/bitcoin-cli -stdin
```
2016-02-24 10:12:25 +01:00
Matthew Zipkin
7eef1d0dad Clarify description of blockindex
see issues:

https://github.com/bitcoin-dot-org/bitcoin.org/issues/1237

https://github.com/bitcoin/bitcoin/issues/7532
2016-02-18 12:42:59 -08:00
Patrick Strateman
110b62f069 Remove vfReachable and modify IsReachable to only use vfLimited.
We do not know that a class of Network is reachable, only that it is not.
2016-02-17 23:21:27 -08:00
Suhas Daftuar
086da92ea7 Add tags to mempool's mapTx indices 2016-02-16 12:35:16 -05:00
Wladimir J. van der Laan
8b70a64d62
Merge #7526: fix spelling of advertise (shows up in the debug log)
37767fd fix spelling of advertise in src and doc (jloughry)
2016-02-16 12:37:03 +01:00
Wladimir J. van der Laan
93c85d458a
Merge #7524: BIP-112: Mempool-only CHECKSEQUENCEVERIFY
a381076 Code style fix. (BtcDrak)
c3c3752 Separate CheckLockTime() and CheckSequence() logic (BtcDrak)
53e53a3 BIP112: Implement CHECKSEQUENCEVERIFY (Mark Friedenbach)
2016-02-16 10:46:34 +01:00
BtcDrak
a38107643f Code style fix.
This if statement is a little obtuse and using braces here
improves readability.
2016-02-16 09:39:44 +00:00
Wladimir J. van der Laan
2d4f73f47e
Merge #7509: Common argument defaults for NODE_BLOOM stuff and -wallet
1fb91b3 Common argument defaults for NODE_BLOOM stuff and -wallet (Luke Dashjr)
2016-02-16 10:00:21 +01:00
Wladimir J. van der Laan
ce5fc02e61
Merge #7536: test: test leading spaces for ParseHex
f31b6b8 test: test leading space for ParseHex (Wladimir J. van der Laan)
2016-02-16 09:26:53 +01:00
Wladimir J. van der Laan
19324cf09c
Merge #7504: Crystal clean make clean
ae6eca0 make clean should clean .a files (Pavel Janík)
2016-02-15 17:18:41 +01:00
Wladimir J. van der Laan
f31b6b8995 test: test leading space for ParseHex
BerkeleyDB dump files have key and value lines indented.
The salvage code passes these to ParseHex as-is.
Check this in the tests (should just pass with current code).
2016-02-15 17:14:30 +01:00
Wladimir J. van der Laan
ca8fb59ae1 wallet: Warn on unexpected EOF while salvaging wallet
Check for EOF before every getline, and warn when reading gets to EOF
before the end of the data.

Stricter error checking could shed more light on issues such as #7463
and #7379.
2016-02-15 16:35:12 +01:00
BtcDrak
c3c375226e Separate CheckLockTime() and CheckSequence() logic
For the sake of a little repetition, make code more readable.
2016-02-14 11:29:40 +00:00
Mark Friedenbach
53e53a33c9 BIP112: Implement CHECKSEQUENCEVERIFY
- Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112)
  <nSequence> CHECKSEQUENCEVERIFY -> <nSequence>
- Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block.
- Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence()
- Add bitwise AND operator to CScriptNum
- Enable CHECKSEQUENCEVERIFY as a standard script verify flag
- Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
2016-02-14 11:29:38 +00:00
jloughry
37767fd46f fix spelling of advertise in src and doc 2016-02-12 12:51:54 -07:00
instagibbs
c372572595 Fix and cleanup listreceivedbyX documentation 2016-02-12 14:06:59 -05:00
Wladimir J. van der Laan
80d1f2e483
Merge #7184: Implement SequenceLocks functions for BIP 68
b043c4b fix sdaftuar's nits again (Alex Morcos)
a51c79b Bug fix to RPC test (Alex Morcos)
da6ad5f Add RPC test exercising BIP68 (mempool only) (Suhas Daftuar)
c6c2f0f Implement SequenceLocks functions (Alex Morcos)
2016-02-12 17:03:46 +01:00
Wladimir J. van der Laan
621940e040
Merge #7520: LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead
a0a17b3 LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead (Pavel Janík)
2016-02-12 13:06:02 +01:00
Pavel Janík
a0a17b3e44 LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead 2016-02-12 07:01:33 +01:00
jmacwhyte
8aa722609d Fix IsInitialBlockDownload to play nice with testnet 2016-02-11 18:02:46 -08:00
Alex Morcos
5a2b1c0c8b Don't resend wallet txs that aren't in our own mempool 2016-02-11 17:34:55 -05:00
Alex Morcos
b043c4b746 fix sdaftuar's nits again
it boggles the mind why these nits can't be delivered on a more timely basis
2016-02-11 15:34:04 -05:00
Wladimir J. van der Laan
0ecb3401fe test: Script_error checking in script_invalid tests
Check the returned script_error. Add expected script_error
for generated as well as custom tests.

The specific error is not part of consensus, however
it could avoid unclear reporting issues such as #6862 in the future.

Fixes #7513.
2016-02-11 17:33:28 +01:00
Wladimir J. van der Laan
2317ad7c56 test: Re-introduce JSON pretty printing in test builder 2016-02-11 17:33:28 +01:00
Wladimir J. van der Laan
b0ff8572ae test: Move non-generated script_invalid test to the correct place
This test was introduced in 9fadf1c874,
but accidentally added in the autogenerated area.
2016-02-11 16:16:40 +01:00
Luke Dashjr
1fb91b3496 Common argument defaults for NODE_BLOOM stuff and -wallet 2016-02-11 06:38:04 +00:00
Leviathn
8d1de43f0c Remove internal miner
This code removes the internal miner which is only useful on Testnet.
This leaves the internal miner that is useful on RegTest intact.
2016-02-10 18:29:13 -08:00
Alex Morcos
c6c2f0fd78 Implement SequenceLocks functions
SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68.

The majority of this code is copied from maaku in #6312
Further credit: btcdrak, sipa, NicolasDorier
2016-02-10 15:35:33 -05:00
Pavel Janík
ae6eca0f49 make clean should clean .a files 2016-02-10 21:03:51 +01:00
Wladimir J. van der Laan
2f3f4af4cc
Merge #7500: Correctly report high-S violations
9d95187 Correctly report high-S violations (Pieter Wuille)
2016-02-10 20:32:13 +01:00
Wladimir J. van der Laan
b93f078496
Merge #7502: Update the wallet best block marker when pruning
e4eebb6 Update the wallet best block marker when pruning (Pieter Wuille)
2016-02-10 19:39:54 +01:00
Wladimir J. van der Laan
c9da9c4bd8
Merge #7491: wallet: Ignore MarkConflict if block hash is not known
40e7b61 wallet: Ignore MarkConflict if block hash is not known (Wladimir J. van der Laan)
2016-02-10 18:56:51 +01:00
Pieter Wuille
e4eebb604e Update the wallet best block marker when pruning 2016-02-10 17:11:13 +01:00
Pieter Wuille
9d95187d5d Correctly report high-S violations 2016-02-10 14:19:20 +01:00
Wladimir J. van der Laan
40e7b61835 wallet: Ignore MarkConflict if block hash is not known
If number of conflict confirms cannot be determined, this means
that the block is still unknown or not yet part of the main chain,
for example during a reindex. Do nothing in that case,
instead of crash with an assertion.

Fixes #7234.
2016-02-09 20:38:31 +01:00
Wladimir J. van der Laan
acf5983502 tests: Remove May15 test
This test is no longer relevant.

It was introduced in 8c222dca4f to check
the switch to 1MB blocks after the BDB too-many-locks issue back in
2013. The switching code has been long since removed.

It also needs a specific data file that is hard to find. I've verified
in #6320 that it still passes, however I think there is zero reason to
keep it.

Closes #6320.
2016-02-09 16:23:52 +01:00
Wladimir J. van der Laan
b49a623799
Merge #7480: Changed getnetworkhps value to double to avoid overflow.
993d089 Changed getnetworkhps value to double to avoid overflow. (instagibbs)
2016-02-09 11:08:40 +01:00
Wladimir J. van der Laan
3ffe4b241e
Merge #7482: [P2P] Ensure headers count is correct
301bc7b Update nQueuedValidatedHeaders after peer disconnection (Suhas Daftuar)
2016-02-09 08:54:25 +01:00
Wladimir J. van der Laan
3db828f951
Merge #7472: rpc: Add WWW-Authenticate header to 401 response
7c06fbd rpc: Add WWW-Authenticate header to 401 response (Wladimir J. van der Laan)
2016-02-09 08:52:02 +01:00
Suhas Daftuar
301bc7bc7e Update nQueuedValidatedHeaders after peer disconnection 2016-02-08 15:50:52 -05:00
instagibbs
993d089e82 Changed getnetworkhps value to double to avoid overflow. 2016-02-08 10:49:27 -05:00
Wladimir J. van der Laan
7c06fbd8f5 rpc: Add WWW-Authenticate header to 401 response
A WWW-Authenticate header must be present in the 401
response to make clients know that they can authenticate,
and how.

    WWW-Authenticate: Basic realm="jsonrpc"

Fixes #7462.
2016-02-08 09:16:29 +01:00
Wladimir J. van der Laan
e7ea5db0c1
Merge #7459: Consensus: Decouple pow.o from util.o
f3757a0 Consensus: Decouple pow.cpp from util.h (Jorge Timón)
2016-02-05 11:19:45 +01:00
Matt
0830552673 Fix spelling: misbeha{b,v}ing 2016-02-04 17:15:20 -06:00
Jorge Timón
f3757a0391 Consensus: Decouple pow.cpp from util.h 2016-02-04 19:21:55 +01:00
Wladimir J. van der Laan
152a8216cc
Merge #7349: Build against system UniValue when available
42407ed build-unix: Update UniValue build conditions (Luke Dashjr)
cdcad9f LDADD dependency order shuffling (Luke Dashjr)
62f7f2e Bugfix: Always include univalue in DIST_SUBDIRS (Luke Dashjr)
2356515 Change default configure option --with-system-univalue to "no" (Luke Dashjr)
5d3b29b doc: Add UniValue to build instructions (Luke Dashjr)
ab22705 Build against system UniValue when available (Luke Dashjr)
2adf7e2 Bugfix: The var is LIBUNIVALUE,not LIBBITCOIN_UNIVALUE (Luke Dashjr)
2016-02-04 17:43:19 +01:00
Wladimir J. van der Laan
d2228384de
Merge #6480: include the chaintip blockindex in the SyncTransaction signal, add signal UpdateTip()
7d0bf0b include the chaintip *blockIndex in the SyncTransaction signal (Jonas Schnelli)
2016-02-04 17:03:09 +01:00
Wladimir J. van der Laan
4f4dc5ef72
Merge #7070: Move maxTxFee out of mempool
fad6244 ATMP: make nAbsurdFee const (MarcoFalke)
fa762d0 [wallet.h] Remove main.h include (MarcoFalke)
fa79db2 Move maxTxFee out of mempool (MarcoFalke)
2016-02-04 14:54:23 +01:00
Wladimir J. van der Laan
2cdbf28cf3
Merge #7192: Unify product name to as few places as possible
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr)
cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr)
cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr)
29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr)
78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr)
3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr)
4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr)
e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr)
917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr)
c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr)
902ccde depends: Add mac_alias to depends (Luke Dashjr)
82a2d98 depends: Add ds_store to depends (Cory Fields)
de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields)
e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr)
63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr)
1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr)
d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
2016-02-04 13:42:24 +01:00
Wladimir J. van der Laan
898fedf42f
Merge #7458: [Net] peers.dat, banlist.dat recreated when missing
c77c662 peers.dat, banlist.dat recreated when missing (kirkalx)
2016-02-04 08:54:21 +01:00
kirkalx
c77c6625f3 peers.dat, banlist.dat recreated when missing 2016-02-04 11:46:24 +13:00
Wladimir J. van der Laan
eb331794a2
Merge #7225: Eliminate unnecessary call to CheckBlock
dbb89dc Eliminate unnecessary call to CheckBlock (Suhas Daftuar)
2016-02-03 13:23:49 +01:00
MarcoFalke
fad6244879 ATMP: make nAbsurdFee const 2016-02-03 13:14:23 +01:00
MarcoFalke
fa762d0f00 [wallet.h] Remove main.h include 2016-02-03 12:44:43 +01:00
Wladimir J. van der Laan
4cdbd4255b
Merge #7444: Improve block validity/ConnectBlock() comments
2f19905 Improve block validity/ConnectBlock() comments (Peter Todd)
2016-02-03 12:29:37 +01:00
Wladimir J. van der Laan
5fd95b4490
Merge #7431: Rename permitrbf to mempoolreplacement and provide minimal string-list forward compatibility (needs 0.12 backport)
b922fbe Rename replacebyfee=opt-in to mempoolreplacement=fee (Luke Dashjr)
3b66e54 Simplify check for replacebyfee=opt-in (Luke Dashjr)
d65dee9 Accept replacebyfee=opt-in for turning on opt-in RBF (Luke Dashjr)
77b55a0 Rename permitrbf to replacebyfee (Luke Dashjr)
2016-02-03 10:27:32 +01:00
Luke Dashjr
a68bb9f5e7 Merge branch 'master' into single_prodname 2016-02-03 05:41:13 +00:00
Luke Dashjr
027fdb83b4 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen 2016-02-03 05:38:51 +00:00
Luke Dashjr
cc2095ecae Rewrite FormatParagraph to handle newlines within input strings correctly 2016-02-03 05:38:43 +00:00
MarcoFalke
fa79db2641 Move maxTxFee out of mempool
Also, remove default values in CMerkleTx::AcceptToMemoryPool()
2016-02-02 20:08:51 +01:00
Wladimir J. van der Laan
fd13fe7ca0
Merge #7091: Consensus build package
cf82d05 Build: Consensus: Make libbitcoinconsensus_la_SOURCES fully dynamic and dependend on both crypto and consensus packages (Jorge Timón)
4feadec Build: Libconsensus: Move libconsensus-ready files to the consensus package (Jorge Timón)
a3d5eec Build: Consensus: Move consensus files from common to its own module/package (Jorge Timón)
2016-02-02 19:02:22 +01:00
Wladimir J. van der Laan
11d74f6a6b
Merge #7084: mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee
fa1193e [doxygen] Actually display comment (MarcoFalke)
fa331db mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee (MarcoFalke)
2016-02-02 15:18:07 +01:00
Wladimir J. van der Laan
47ac04e8b1
Merge #7311: MOVEONLY: Move non-consensus functions out of pow
e867561 MOVEONLY: non-consensus: from pow to chain: (Jorge Timón)
2016-02-02 14:16:16 +01:00
MarcoFalke
fa1193e254 [doxygen] Actually display comment 2016-02-02 13:39:23 +01:00
Luke Dashjr
b922fbe063 Rename replacebyfee=opt-in to mempoolreplacement=fee 2016-02-01 19:30:37 +00:00
Suhas Daftuar
dbb89dc793 Eliminate unnecessary call to CheckBlock
ProcessNewBlock would return failure early if CheckBlock failed, before
calling AcceptBlock.  AcceptBlock also calls CheckBlock, and upon failure
would update mapBlockIndex to indicate that a block was failed.  By returning
early in ProcessNewBlock, we were not marking blocks that fail a check in
CheckBlock as permanently failed, and thus would continue to re-request and
reprocess them.
2016-02-01 14:29:45 -05:00
Gregory Maxwell
1e05727072 Decide eviction group ties based on time.
This corrects a bug the case of tying group size where the code may
 fail to select the group with the newest member. Since newest time
 is the final selection criteria, failing to break ties on it
 on the step before can undermine the final selection.

Tied netgroups are very common.

(cherry picked from commit 8e09f914f8ec66301257358b250e9a61befadd95)
2016-02-01 15:31:21 +01:00
Gregory Maxwell
1e9613ac09 Do not absolutely protect local peers from eviction.
With automatic tor HS support in place we should probably not be providing
 absolute protection for local peers, since HS inbound could be used to
 attack pretty easily.  Instead, this counts on the latency metric inside
 AttemptToEvictConnection to privilege actually local peers.

(cherry picked from commit 46dbcd4833115401fecbb052365b4c7725874414)
2016-02-01 15:31:17 +01:00
Pieter Wuille
5d743099b5 Get rid of inaccurate ScriptSigArgsExpected
(cherry picked from commit 52b29dca7670c3f6d2ab918c0fff1d17c4e494ad)
2016-02-01 15:28:25 +01:00
Wladimir J. van der Laan
58a8574400
Merge #7439: Add whitelistforcerelay to control forced relaying. [#7099 redux]
89d113e Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. (Gregory Maxwell)
325c725 Add whitelistforcerelay to control forced relaying. (Gregory Maxwell)
2016-02-01 14:11:15 +01:00
Gregory Maxwell
89d113e02a Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. 2016-02-01 12:32:57 +00:00
Wladimir J. van der Laan
31ec14b74b
Merge #7287: Consensus: Remove calls to error() and FormatStateMessage()
93fc58c Consensus: Remove calls to error() and FormatStateMessage() from some consensus code in main (Jorge Timón)
2016-02-01 10:21:53 +01:00
Peter Todd
2f19905324
Improve block validity/ConnectBlock() comments
Previously didn't make clear that the ContextualCheckBlock* functions
meant the block headers as context - not the UTXO set itself - and that
ConnectBlock() also did UTXO-related validity checks (in the future we
may split that functionality into a separate UTXO-specific contextual
check block function).

Also, reordered to put validity checks first for better readability.
2016-01-31 00:40:23 -05:00
Luke Dashjr
cdcad9fc5f LDADD dependency order shuffling 2016-01-31 02:32:55 +00:00
Luke Dashjr
62f7f2ee21 Bugfix: Always include univalue in DIST_SUBDIRS 2016-01-31 02:32:00 +00:00
MarcoFalke
fa331db68b mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee 2016-01-30 11:29:22 +01:00
Jorge Timón
93fc58c742 Consensus: Remove calls to error() and FormatStateMessage() from some consensus code in main 2016-01-29 18:38:39 +01:00
Wladimir J. van der Laan
019280617a
Merge #6842: limitfreerelay edge case bugfix
2dfeaa1 limitfreerelay edge case bugfix: (ptschip)
2016-01-29 13:12:02 +01:00
Luke Dashjr
3b66e54457 Simplify check for replacebyfee=opt-in 2016-01-29 01:28:54 +00:00
Gregory Maxwell
325c725fb6 Add whitelistforcerelay to control forced relaying.
Also renames whitelistalwaysrelay.

Nodes relay all transactions from whitelisted peers, this
 gets in the way of some useful reasons for whitelisting
 peers-- for example, bypassing bandwidth limitations.

The purpose of this forced relaying is for specialized gateway
 applications where a node is being used as a P2P connection
 filter and multiplexer, but where you don't want it getting
 in the way of (re-)broadcast.

This change makes it configurable with whitelistforcerelay.
2016-01-28 22:26:21 +00:00
Kefkius
8b3d8e3991
GUI: Disable tab navigation for peers tables.
Fix a bug in which the Peers tab of the debug window
does not allow navigation to other tabs via Ctrl[+Shift]+Tab.
2016-01-28 15:26:54 -05:00
Wladimir J. van der Laan
326ffed09b
Merge #7212: Adds unittests for CAddrMan and CAddrinfo, removes source of non-determinism.
40c87b6 Increase test coverage for addrman and addrinfo (Ethan Heilman)
2016-01-28 13:14:07 +01:00
Wladimir J. van der Laan
62f2d769e4
Merge #7348: MOVE ONLY: move rpc* to rpc/
d13f65e rpc: update inline comments to refer to new file paths (Daniel Cousens)
a0eaff8 move rpc* to rpc/ (Daniel Cousens)
2016-01-28 11:28:24 +01:00
Wladimir J. van der Laan
4a46bdc0fe
Merge #7415: net: Hardcoded seeds update January 2016
4818dba net: Hardcoded seeds update January 2016 (Wladimir J. van der Laan)
2016-01-28 10:54:14 +01:00
Jonas Schnelli
cdcbc59a42
Merge #7396: [Qt] Add option to increase/decrease font size in the console window
43abb02 [Qt] Add a new chevron/arrow icon for the console prompt line (Jonas Schnelli)
56c9e66 [Qt] keep scroll position in GUI console after changing font size (Jonas Schnelli)
3a3a927 [Qt] Add option to increase/decrease font size in the console window (Jonas Schnelli)
2016-01-28 10:23:31 +01:00
Luke Dashjr
d65dee961e Accept replacebyfee=opt-in for turning on opt-in RBF
Basic forward-compatibility with more flexible parameters like fss
2016-01-28 06:10:35 +00:00
Luke Dashjr
77b55a00ed Rename permitrbf to replacebyfee
"permit" is currently used to configure transaction filtering, whereas replacement is more to do with the memory pool state than the transaction itself.
2016-01-28 05:11:06 +00:00
Luke Dashjr
78ec83ddfe splashscreen: Resize text to fit exactly 2016-01-27 20:29:18 +00:00
Ethan Heilman
40c87b6e69 Increase test coverage for addrman and addrinfo
Adds several unittests for CAddrMan and CAddrInfo.
Increases the accuracy of addrman tests.
Removes non-determinism in tests by overriding the random number generator.
Extracts testing code from addrman class to test class.
2016-01-27 10:50:58 -05:00
Wladimir J. van der Laan
9189e30b12
Merge #7300: [trivial] Add missing copyright headers
fabcee1 Remove copyright header from autogenerated chainparamsseeds.h (MarcoFalke)
fa60d05 Add missing copyright headers (MarcoFalke)
fa7e4c0 Bump copyright headers to 2014 (MarcoFalke)
2016-01-27 12:06:31 +01:00
Cory Fields
f3d3eaf78e release: add check-symbols and check-security make targets
These are not added to the default checks because some of them depend on
release-build configs.
2016-01-26 23:07:04 -05:00
Jonas Schnelli
43abb02aa2
[Qt] Add a new chevron/arrow icon for the console prompt line 2016-01-26 15:34:36 +01:00
Wladimir J. van der Laan
473ad1bb02
Merge #7391: [init] Clarify help message
fae78fa [init] Clarify permitrbf help message (MarcoFalke)
2016-01-25 17:44:58 +01:00
Wladimir J. van der Laan
4818dba900 net: Hardcoded seeds update January 2016 2016-01-25 16:14:14 +01:00
MarcoFalke
fae78fa818 [init] Clarify permitrbf help message 2016-01-23 22:46:24 +01:00
Jonas Schnelli
f281caac48
Merge #7384: [qt] Peertable: Increase SUBVERSION_COLUMN_WIDTH
faa9011 [qt] Peertable: Increase SUBVERSION_COLUMN_WIDTH (MarcoFalke)
2016-01-23 14:17:18 +01:00
Jonas Schnelli
56c9e66a6d
[Qt] keep scroll position in GUI console after changing font size 2016-01-23 00:05:14 +01:00
Jonas Schnelli
3a3a927325
[Qt] Add option to increase/decrease font size in the console window 2016-01-22 21:46:42 +01:00
Wladimir J. van der Laan
fc08994000
Merge #7262: Reduce inefficiency of GetAccountAddress()
2409865 Reduce inefficiency of GetAccountAddress() (Chris Moore)
2016-01-22 15:31:11 +01:00
Wladimir J. van der Laan
6a07208388
Merge #7056: Save last db read
8504867 Save the last unnecessary database read (Alex Morcos)
2016-01-22 14:15:52 +01:00
Jonas Schnelli
f221fc1887
Merge #7364: [qt] Windows: Make rpcconsole monospace font larger
fa6a59d [qt] Windows: Make rpcconsole monospace font larger (MarcoFalke)
2016-01-22 09:47:51 +01:00
Wladimir J. van der Laan
b768108d9c Add option -permitrbf to set transaction replacement policy
Add a configuration option `-permitrbf` to set transaction replacement policy
for the mempool.

Enabling it will enable (opt-in) RBF, disabling it will refuse all
conflicting transactions.
2016-01-21 11:24:31 +01:00
Jonas Schnelli
ae2db67fee
Merge #7383: [Qt] rename "amount" to "requested amount" in receive coins table
df6e8e1 [Qt] rename "amount" to "requested amount" in receive coins table (Jonas Schnelli)
2016-01-21 09:00:53 +01:00
MarcoFalke
faa9011d09 [qt] Peertable: Increase SUBVERSION_COLUMN_WIDTH 2016-01-20 23:00:10 +01:00
Daniel Cousens
d13f65ebac rpc: update inline comments to refer to new file paths 2016-01-21 08:39:04 +11:00
Daniel Cousens
a0eaff8a1d move rpc* to rpc/ 2016-01-21 08:36:55 +11:00
Jonas Schnelli
df6e8e17e4
[Qt] rename "amount" to "requested amount" in receive coins table 2016-01-20 17:30:06 +01:00
Wladimir J. van der Laan
b92ea98503
Merge #7183: Improved readability of ApproximateBestSubset
96efcad Improved readability of sorting for coin selection. (Murch)
2016-01-20 15:55:03 +01:00
Wladimir J. van der Laan
9982710e88
Merge #7307: [RPC, Wallet] Move RPC dispatch table registration to wallet/ code
dd2dc40 [RPC, Wallet] Move RPC dispatch table registration to wallet/ code (Jonas Schnelli)
2016-01-20 15:15:51 +01:00
Jonas Schnelli
dd2dc400ee
[RPC, Wallet] Move RPC dispatch table registration to wallet/ code
Allow extending the rpc dispatch table by appending commands when server is not running.
2016-01-20 15:03:25 +01:00
Wladimir J. van der Laan
82429d0861
Merge #7222: RPC: Indicate which transactions are signaling opt-in RBF
eaa8d27 RPC: indicate which transactions are replaceable (Suhas Daftuar)
2016-01-20 13:50:37 +01:00
Wladimir J. van der Laan
5578144413
Merge #7350: Banlist updates
e8600c9 banlist (bugfix): allow CNode::SweepBanned() to run on interval (Philip Kaufmann)
2977c24 banlist: add more banlist infos to log / add GUI signal (Philip Kaufmann)
ce479aa banlist: better handling of banlist in StartNode() (Philip Kaufmann)
57c77fe banlist: update set dirty to be more fine grained (Philip Kaufmann)
2016-01-20 13:38:40 +01:00
MarcoFalke
fa6d4cc095 [walletdb] Fix syntax error in key parser 2016-01-20 09:44:53 +01:00
Suhas Daftuar
eaa8d2754b RPC: indicate which transactions are replaceable
Add "bip125-replaceable" output field to listtransactions and gettransaction
which indicates if an unconfirmed transaction, or any unconfirmed parent, is
signaling opt-in RBF according to BIP 125.
2016-01-19 08:30:04 -05:00
Wladimir J. van der Laan
f9fd4c2884
Merge pull request #7281: Improve CheckInputs() comment about sig verification
fd83615 Improve CheckInputs() comment about sig verification (Peter Todd)
2016-01-19 13:23:32 +01:00
Wladimir J. van der Laan
3b43cad9d0
Merge pull request #7164: Do not download transactions during initial blockchain sync
39a525c Do not download transactions during inital sync (ptschip)
2016-01-19 12:58:15 +01:00
Luke Dashjr
3cae14056a Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere 2016-01-19 08:42:05 +00:00
Wladimir J. van der Laan
e4e77ee55d
Merge pull request #7194
135d6ec Add RPC tests for getblockheader. (James O'Beirne)
4745636 Add RPC documentation for getblockheader[chainwork]. (James O'Beirne)
16d4fce Add assert_is_hex_string and assert_is_hash_string to RPC test utils. (James O'Beirne)
2016-01-18 12:24:01 +01:00
Wladimir J. van der Laan
ae20172941
Merge pull request #7232
94bdd71 Added help text for chainwork value (Gregory Sanders)
2016-01-18 12:20:13 +01:00
Wladimir J. van der Laan
47c5ed19f3
Merge pull request #7208
64360f1 Make max tip age an option instead of chainparam (Wladimir J. van der Laan)
2016-01-18 11:55:59 +01:00
Wladimir J. van der Laan
c851d8d71b
Merge pull request #7290
fa461df Clarify mocktime help message (MarcoFalke)
faa572a [init] Help Msg: Use Params(CBaseChainParams::MAIN) (MarcoFalke)
fa6ab96 [init] Add missing help for args (MarcoFalke)
fac11ea [init] Fix error message of maxtxfee invalid amount (MarcoFalke)
2016-01-18 11:21:51 +01:00
Wladimir J. van der Laan
5e00147838
Merge pull request #7313
0331aa3 Fixing typos on security-check.py and torcontrol.cpp (calebogden)
2016-01-18 10:45:25 +01:00
Wladimir J. van der Laan
a8bd616fea
Merge pull request #7329
9d263bd Typo fixes in comments (Chris Wheeler)
2016-01-18 10:41:32 +01:00
Wladimir J. van der Laan
2350ab28fb
Merge pull request #7363
bd34174 Update license year range to 2016 (Prayag Verma)
2016-01-18 10:30:22 +01:00
MarcoFalke
fa6a59dd39 [qt] Windows: Make rpcconsole monospace font larger 2016-01-17 19:28:49 +01:00
Prayag Verma
bd34174ebc Update license year range to 2016 2016-01-17 23:38:11 +05:30
Chris Wheeler
9d263bd17c Typo fixes in comments 2016-01-17 11:03:56 +00:00
MarcoFalke
fabcee1972 Remove copyright header from autogenerated chainparamsseeds.h 2016-01-16 15:31:22 +01:00
Wladimir J. van der Laan
fd9356ba4e
Merge pull request #7322
c0cf48d c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally (Cory Fields)
2016-01-16 10:49:46 +01:00
Luke Dashjr
5bc4fb7b60 Merge branch 'master' into 20150703_banlist_updates 2016-01-15 05:17:15 +00:00
Luke Dashjr
ab22705a7b Build against system UniValue when available 2016-01-15 04:34:06 +00:00
Luke Dashjr
2adf7e2c90 Bugfix: The var is LIBUNIVALUE,not LIBBITCOIN_UNIVALUE 2016-01-15 04:34:02 +00:00
Wladimir J. van der Laan
e1060c56cc
Merge pull request #7334
fa989fb [qt] coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke)
2016-01-14 13:56:59 +01:00
Jonas Schnelli
c079d79c9a
Merge pull request #7327
30cdace [Wallet] Transaction View: LastMonth calculation fixed (crowning-)
2016-01-13 21:24:43 +01:00
crowning-
30cdacea3c [Wallet] Transaction View: LastMonth calculation fixed 2016-01-13 21:17:08 +01:00
MarcoFalke
fa989fbf57 [qt] coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) 2016-01-13 18:46:12 +01:00
Wladimir J. van der Laan
17ef279304
Merge pull request #7332
faf671b [wallet] Clarify rpc help message with regard to rounding (MarcoFalke)
2016-01-13 16:01:28 +01:00
Wladimir J. van der Laan
be6d5a617d
Merge pull request #7312
d11fc16 [Wallet] Call notification signal when a transaction is abandoned (Jonas Schnelli)
df0e222 Add RPC test for abandoned and conflicted transactions. (Alex Morcos)
01e06d1 Add new rpc call: abandontransaction (Alex Morcos)
9e69717 Make wallet descendant searching more efficient (Alex Morcos)
2016-01-13 15:47:45 +01:00
Jonas Schnelli
d11fc1695c [Wallet] Call notification signal when a transaction is abandoned 2016-01-13 08:42:04 -05:00
Alex Morcos
01e06d1fa3 Add new rpc call: abandontransaction
Unconfirmed transactions that are not in your mempool either due to eviction or other means may be unlikely to be mined.  abandontransaction gives the wallet a way to no longer consider as spent the coins that are inputs to such a transaction.  All dependent transactions in the wallet will also be marked as abandoned.
2016-01-13 08:42:04 -05:00
MarcoFalke
faf671bca6 [wallet] Clarify rpc help message with regard to rounding 2016-01-13 12:06:24 +01:00
Wladimir J. van der Laan
2cd004b123
Merge pull request #7326
3a9dfe9 Fix typo, wrong information in gettxout help text. (paveljanik)
2016-01-13 11:50:38 +01:00
Wladimir J. van der Laan
c49551886a
Merge pull request #7296
bebe58b SQUASHME: Fix rpc tests that assumed fallback to minRelayTxFee (Alex Morcos)
e420a1b Add sane fallback for fee estimation (Alex Morcos)
995b9f3 Always respect GetRequiredFee for wallet txs (Alex Morcos)
2016-01-13 11:04:31 +01:00
Jorge Timón
e86756193e MOVEONLY: non-consensus: from pow to chain:
- GetBlockProof
- GetBlockProofEquivalentTime
2016-01-12 13:43:14 +01:00
Gregory Sanders
94bdd71f9b Added help text for chainwork value 2016-01-11 12:06:55 -05:00
paveljanik
3a9dfe9d14 Fix typo, wrong information in gettxout help text. 2016-01-10 17:33:54 +01:00
Wladimir J. van der Laan
dd1304ec21
Merge pull request #7081
45b8e27 -bytespersigop option to additionally limit sigops in transactions we relay and mine (Luke Dashjr)
2016-01-09 18:01:54 +01:00
Luke Dashjr
fdc202f4b0 Merge branch bytespersigop 2016-01-09 16:53:12 +00:00
MarcoFalke
fa461df685 Clarify mocktime help message 2016-01-09 13:57:08 +01:00
calebogden
0331aa350c Fixing typos on security-check.py and torcontrol.cpp 2016-01-08 13:31:42 -08:00
Cory Fields
c0cf48d1ac 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.
2016-01-08 13:32:00 -05:00
Wladimir J. van der Laan
9de541a9c9
Merge pull request #7306
f61766b Make sure conflicted wallet tx's update balances (Alex Morcos)
2016-01-08 17:36:19 +01:00
Jonas Schnelli
8a7f0001be
[RPC] remove the option of having multiple timer interfaces 2016-01-08 11:18:28 +01:00
Jonas Schnelli
db198d51a6
Fix RPCTimerInterface ordering issue
Dispatching a QThread from a non Qt thread is not allowed. Always use the HTTPRPCTimerInterface (non QT) to dispatch RPCRunLater threads.
2016-01-08 11:15:00 +01:00
Alex Morcos
9e69717254 Make wallet descendant searching more efficient 2016-01-07 16:31:12 -05:00
Jonas Schnelli
b1cf0058d9
Merge pull request #7298
faf3299 [qt] Intro: Display required space (MarcoFalke)
2016-01-07 13:21:54 +01:00
MarcoFalke
faa572a329 [init] Help Msg: Use Params(CBaseChainParams::MAIN) 2016-01-07 12:10:13 +01:00
MarcoFalke
fa6ab96799 [init] Add missing help for args 2016-01-07 12:09:51 +01:00
MarcoFalke
fac11ea310 [init] Fix error message of maxtxfee invalid amount 2016-01-07 12:09:30 +01:00
Wladimir J. van der Laan
7b0a9a8040
Merge pull request #7266
6cd198f Removed comment about IsStandard for P2SH scripts (Marcel Krüger)
2016-01-07 11:58:37 +01:00
Wladimir J. van der Laan
5541560938
Merge pull request #7293
faf538b [trivial] Merge test cases and replace CENT with COIN (MarcoFalke)
fa3c7e6 [wallet] Add regression test for vValue sort order (MarcoFalke)
2016-01-07 09:24:34 +01:00
Wladimir J. van der Laan
d964b5bb1a
Merge pull request #7229
fa33d97 [walletdb] Add missing LOCK() in Recover() for dummyWallet (MarcoFalke)
fa14d99 [qa] check if wallet or blochchain maintenance changes the balance (MarcoFalke)
fa0765d [qa] Cleanup wallet.py test (MarcoFalke)
2016-01-07 09:17:11 +01:00
Wladimir J. van der Laan
de9e5ea75e
Merge pull request #7257
5e10922 Combine common error strings for different options so translations can be shared and reused (Luke Dashjr)
2016-01-07 09:12:20 +01:00
Alex Morcos
f61766b37b Make sure conflicted wallet tx's update balances 2016-01-06 17:24:30 -05:00
ptschip
2dfeaa1ad0 limitfreerelay edge case bugfix:
If a new transaction will cause limitfreerelay
to be exceeded it should not be accepted
into the memory pool and the byte counter
should be updated only after the fact.
2016-01-06 10:15:00 -08:00
Cory Fields
57d2f62c99 c++11: CAccountingEntry must be defined before use in a list
c++11ism. This fixes builds against libc++.
2016-01-05 17:17:29 -05:00
Cory Fields
89f71c68c0 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.
2016-01-05 17:17:29 -05:00
Cory Fields
76ac35f36d 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.
2016-01-05 17:17:29 -05:00
Murch
96efcadfc0 Improved readability of sorting for coin selection.
Future proofing added lines
2016-01-05 22:03:43 +01:00
MarcoFalke
fa60d05a4e Add missing copyright headers 2016-01-05 21:34:15 +01:00
MarcoFalke
fa7e4c0919 Bump copyright headers to 2014 2016-01-05 21:01:39 +01:00
MarcoFalke
faf538bfdb [trivial] Merge test cases and replace CENT with COIN 2016-01-05 20:36:03 +01:00
MarcoFalke
faf3299b73 [qt] Intro: Display required space
Required space depends on the user's choice:
 -prune=0
 -prune=<n>
2016-01-05 19:22:47 +01:00
Alex Morcos
e420a1b15e Add sane fallback for fee estimation
Add new commandline option "-fallbackfee" to use when fee estimation does not have sufficient data.
2016-01-05 13:13:23 -05:00
Alex Morcos
995b9f385b Always respect GetRequiredFee for wallet txs 2016-01-05 13:10:19 -05:00
Wladimir J. van der Laan
605c17844e
Merge pull request #7205
fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke)
fa24439 Bump copyright headers to 2015 (MarcoFalke)
fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2016-01-05 14:11:40 +01:00
Jonas Schnelli
aa413687de
Merge pull request #7282
621bd69 [Qt] fix coincontrol update issue when deleting a send coin entry (Jonas Schnelli)
2016-01-05 13:02:00 +01:00
Wladimir J. van der Laan
2078495d9c
Merge pull request #7193
fafd093 [wallet] Adjust pruning test (MarcoFalke)
2016-01-05 12:55:00 +01:00
Wladimir J. van der Laan
a10a7920c3
Merge pull request #7217
5246180 Mark blocks with too many sigops as failed (Suhas Daftuar)
2016-01-05 12:04:53 +01:00
MarcoFalke
fa3c7e644f [wallet] Add regression test for vValue sort order 2016-01-05 00:40:20 +01:00
Wladimir J. van der Laan
ac982a16e0
Merge pull request #7263
a5a0831 Double semicolon cleanup. (21E14)
2016-01-04 10:17:09 +01:00
Wladimir J. van der Laan
136abda597
qt: periodic translations pull from transifex 2016-01-04 09:48:44 +01:00
Jonas Schnelli
621bd6919f
[Qt] fix coincontrol update issue when deleting a send coin entry 2016-01-04 09:44:36 +01:00
Jonas Schnelli
e289807e5a
Merge pull request #7255
6fd0a07 Remove hardcoded fee from CoinControl ToolTip (fanquake)
5fdf32d Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake)
2016-01-04 09:23:38 +01:00
Wladimir J. van der Laan
08ab9069af
Merge pull request #7256
33877ed Add note to CoinControl Dialog workaround (fanquake)
2016-01-04 09:21:35 +01:00
Peter Todd
fd836153d5
Improve CheckInputs() comment about sig verification 2016-01-03 20:39:05 -08:00
Pieter Wuille
7ef8f3c072 Report non-mandatory script failures correctly 2016-01-03 16:50:31 +01:00
fanquake
6fd0a079d8 Remove hardcoded fee from CoinControl ToolTip 2016-01-03 05:57:51 +08:00
fanquake
33877ed3b8 Add note to CoinControl Dialog workaround 2016-01-02 17:35:33 +08:00
Marcel Krüger
6cd198f380 Removed comment about IsStandard for P2SH scripts
Since #4365 (6259937388) P2SH scripts do not have to be IsStandard scripts.
2015-12-30 21:53:40 +01:00
21E14
a5a0831458 Double semicolon cleanup. 2015-12-30 12:23:07 -05:00
Chris Moore
2409865e14 Reduce inefficiency of GetAccountAddress()
Don't scan the wallet to see if the current key has been used if we're going to make a new key anyway.
Stop scanning the wallet as soon as we see that the current key has been used.
Don't call isValid() twice on the current key.
2015-12-28 16:56:53 -08:00
Luke Dashjr
5e109225ae Combine common error strings for different options so translations can be shared and reused 2015-12-26 08:04:03 +00:00
fanquake
5fdf32de7e Replace some instances of formatWithUnit with formatHtmlWithUnit
Strings in a HTML context should be using formatHtmlWithUnit.
2015-12-26 11:49:19 +08:00
Jonas Schnelli
be9a9a3d22
Merge pull request #7214
fa2f4bc qt5: Use the fixed font the system recommends (MarcoFalke)
2015-12-23 10:13:00 +01:00
Jonas Schnelli
a1c185be54
Merge pull request #7218
fa5769e [qt] Fix misleading translation (MarcoFalke)
fa8c8d7 torcontrol debug: Change to a blanket message that covers both cases (MarcoFalke)
2015-12-22 14:05:39 +01:00
Luke Dashjr
917b1d03cf Set copyright holders displayed in notices separately from the package name
This helps avoid accidental removal of upstream copyright names
2015-12-22 12:29:18 +00:00
Wladimir J. van der Laan
595f93977c
Merge pull request #7213
37d271d Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY. (mb300sd)
2015-12-22 11:37:11 +01:00
Wladimir J. van der Laan
c24337964f
Merge pull request #7062
901b01d Remove GetMinRelayFee (Suhas Daftuar)
27fae34 Use fee deltas for determining mempool acceptance (Suhas Daftuar)
9ef2a25 Update replace-by-fee logic to use fee deltas (Suhas Daftuar)
eb30666 Fix mempool limiting for PrioritiseTransaction (Suhas Daftuar)
2015-12-21 17:14:13 +01:00
MarcoFalke
fa33d9740c [walletdb] Add missing LOCK() in Recover() for dummyWallet 2015-12-19 14:26:46 +01:00
Luke Dashjr
1a6c67c8f5 Parameterise 2009 in translatable copyright strings 2015-12-18 12:36:10 +00:00
MarcoFalke
fa5769e95a [qt] Fix misleading translation 2015-12-16 15:44:46 +01:00
MarcoFalke
fa8c8d7fa6 torcontrol debug: Change to a blanket message that covers both cases 2015-12-16 12:57:06 +01:00
Suhas Daftuar
5246180f16 Mark blocks with too many sigops as failed 2015-12-15 15:40:50 -05:00
ptschip
39a525c21f Do not download transactions during inital sync 2015-12-15 07:41:44 -08:00
Elias Rohrer
e18378e53f Removed offline testnet DNSSeed 'alexykot.me'. 2015-12-15 14:53:15 +01:00
mb300sd
37d271d7cc Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY. 2015-12-15 02:01:45 -05:00
MarcoFalke
fa2f4bc4eb qt5: Use the fixed font the system recommends 2015-12-14 21:39:18 +01:00
James O'Beirne
4745636126 Add RPC documentation for getblockheader[chainwork]. 2015-12-14 10:40:15 -08:00
Wladimir J. van der Laan
7a5040155e
Merge pull request #7125
5400ef6 Replace trickle nodes with per-node/message Poisson delays (Pieter Wuille)
2015-12-14 13:42:02 +01:00
Wladimir J. van der Laan
64360f1304 Make max tip age an option instead of chainparam
After discussion in #7164 I think this is better.

Max tip age was introduced in #5987 to make it possible to run
testnet-in-a-box. But associating this behavior with the testnet chain
is wrong conceptually, as it is not needed in normal usage.
Should aim to make testnet test the software as-is.

Replace it with a (debug) option `-maxtipage`, which can be
specified only in the specific case.
2015-12-14 13:29:28 +01:00
Wladimir J. van der Laan
dc511dcfd9
Merge pull request #7200
d812daf fix logic for error log (accraze)
c611acc wallet: check if tx scriptPubKey is unspendable (accraze)
b6915b8 checks for null data transaction before debug.log (accraze)
2015-12-14 13:08:35 +01:00
Luke Dashjr
d5f46832de Unify package name to as few places as possible without major changes 2015-12-14 02:11:10 +00:00
Matt Corallo
daf6466330 Add "NODE_BLOOM" to guiutil so that peers don't get UNKNOWN[4] 2015-12-13 16:21:48 -08:00
MarcoFalke
fa24439ff3 Bump copyright headers to 2015 2015-12-13 18:08:39 +01:00
accraze
d812daf967 fix logic for error log 2015-12-12 10:45:53 -08:00
accraze
c611acc38a wallet: check if tx scriptPubKey is unspendable 2015-12-12 10:33:37 -08:00
accraze
b6915b8239 checks for null data transaction before debug.log
CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves #6142
2015-12-11 18:07:11 -08:00
Pieter Wuille
5400ef6bcb Replace trickle nodes with per-node/message Poisson delays
We used to have a trickle node, a node which was chosen in each iteration of
the send loop that was privileged and allowed to send out queued up non-time
critical messages. Since the removal of the fixed sleeps in the network code,
this resulted in fast and attackable treatment of such broadcasts.

This pull request changes the 3 remaining trickle use cases by random delays:
* Local address broadcast (while also removing the the wiping of the seen filter)
* Address relay
* Inv relay (for transactions; blocks are always relayed immediately)

The code is based on older commits by Patrick Strateman.
2015-12-11 22:20:38 +01:00
Wladimir J. van der Laan
9ee02cf564
Merge pull request #7156
6e76587 rpc: remove cs_main lock from `createrawtransaction` (Wladimir J. van der Laan)
2015-12-11 14:55:38 +01:00
Wladimir J. van der Laan
9bbe71b641 net: Add and document network messages in protocol.h
- Avoids string typos (by making the compiler check)
- Makes it easier to grep for handling/generation of a certain message type
- Refer directly to documentation by following the symbol in IDE
- Move list of valid message types to protocol.cpp:
    protocol.cpp is a more appropriate place for this, and having
    the array there makes it easier to keep things consistent.
2015-12-10 12:14:06 +01:00
Wladimir J. van der Laan
5dc63ed1ca
Merge pull request #7179
2041190 test: Add basic test for `reject` code (Wladimir J. van der Laan)
9fc6ed6 net: Fix sent reject messages for blocks and transactions (Wladimir J. van der Laan)
2015-12-10 11:58:02 +01:00
Wladimir J. van der Laan
00b4b8d1c4
Merge pull request #7154
a3c3ddb [Qt] add InMempool() info to transaction details (Jonas Schnelli)
2015-12-09 10:48:27 +01:00
MarcoFalke
fafd09375e [wallet] Adjust pruning test 2015-12-09 09:34:48 +01:00
Wladimir J. van der Laan
0800092fc2
Merge pull request #4906
fc0f52d Added a test for the pruning of extraneous inputs after ApproximateBestSet (Murch)
af9510e Moved set reduction to the end of ApproximateBestSubset to reduce performance impact (Murch)
5c03483 Coinselection prunes extraneous inputs from ApproximateBestSubset (AlSzacrel)
2015-12-08 10:23:01 +01:00
Jorge Timón
cf82d05dd4 Build: Consensus: Make libbitcoinconsensus_la_SOURCES fully dynamic and dependend on both crypto and consensus packages
Some extra bytes in libconsensus to get all the crypto (except for signing, which is in the common module) below the libconsensus future independent repo (that has libsecp256k1 as a subtree).
hmac_sha256.o seems to be the only thing libbitcoinconsensus doesn't depend on from crypto, some more bytes for the final libconsensus: I'm not personally worried.
2015-12-08 06:31:04 +01:00
Jorge Timón
4feadec98e Build: Libconsensus: Move libconsensus-ready files to the consensus package 2015-12-08 06:31:01 +01:00
Jorge Timón
a3d5eec546 Build: Consensus: Move consensus files from common to its own module/package 2015-12-08 06:30:14 +01:00
Murch
fc0f52d780 Added a test for the pruning of extraneous inputs after ApproximateBestSet 2015-12-07 20:08:37 +01:00
Murch
af9510e037 Moved set reduction to the end of ApproximateBestSubset to reduce performance impact 2015-12-07 17:36:47 +01:00
Wladimir J. van der Laan
e3bc5e0e92 net: Account for sendheaders verack messages
Looks like these were forgotten in #6589.
2015-12-07 15:17:53 +01:00
Wladimir J. van der Laan
9fc6ed6003 net: Fix sent reject messages for blocks and transactions
Ever since we #5913 have been sending invalid reject messages
for transactions and blocks.
2015-12-07 14:53:20 +01:00
Wladimir J. van der Laan
dc0305d15a
Merge pull request #6589
ca188c6 log bytes recv/sent per command (Jonas Schnelli)
2015-12-07 13:54:22 +01:00
Jonas Schnelli
ca188c629e
log bytes recv/sent per command 2015-12-07 13:32:59 +01:00
AlSzacrel
5c03483e26 Coinselection prunes extraneous inputs from ApproximateBestSubset
A further pass over the available inputs has been added to ApproximateBestSubset after a candidate set has been found. It will prune any extraneous inputs in the selected subset, in order to decrease the number of input and the resulting change.
2015-12-06 23:26:45 +01:00
Matt Corallo
96918a2f09 Don't do mempool lookups for "mempool" command without a filter 2015-12-05 17:45:44 +08:00
Jonas Schnelli
7d0bf0bb46
include the chaintip *blockIndex in the SyncTransaction signal
- allows reducing of calls to main.cpp for getting the chaintip during transaction syncing
- potentially allows reducing of cs_main locks
2015-12-04 09:18:53 +01:00
Gregory Maxwell
6aadc75578 Disconnect on mempool requests from peers when over the upload limit.
Mempool requests use a fair amount of bandwidth when the mempool is large,
 disconnecting peers using them follows the same logic as disconnecting
 peers fetching historical blocks.
2015-12-03 20:13:10 +00:00
Wladimir J. van der Laan
54a550bef8
Merge pull request #7113
086ee67 Switch to a more efficient rolling Bloom filter (Pieter Wuille)
2015-12-03 13:36:07 +01:00
Wladimir J. van der Laan
8843676621
Merge pull request #7133
aa4b0c2 When not filtering blocks, getdata sends more in one test (Pieter Wuille)
d41e44c Actually only use filterInventoryKnown with MSG_TX inventory messages. (Gregory Maxwell)
b6a0da4 Only use filterInventoryKnown with MSG_TX inventory messages. (Patick Strateman)
6b84935 Rename setInventoryKnown filterInventoryKnown (Patick Strateman)
e206724 Remove mruset as it is no longer used. (Gregory Maxwell)
ec73ef3 Replace setInventoryKnown with a rolling bloom filter. (Gregory Maxwell)
2015-12-03 13:16:46 +01:00
Wladimir J. van der Laan
c12ff995f7
Now that 0.12 has been branched, master is 0.12.99
... in preparation for 0.13
2015-12-03 12:07:01 +01:00
Wladimir J. van der Laan
3cd836c1d8
Merge pull request #7158
fab8347 [qt] Use tr() instead of _() (MarcoFalke)
2015-12-03 10:52:49 +01:00
Suhas Daftuar
901b01d674 Remove GetMinRelayFee
One test in AcceptToMemoryPool was to compare a transaction's fee
agains the value returned by GetMinRelayFee. This value was zero for
all small transactions.  For larger transactions (between
DEFAULT_BLOCK_PRIORITY_SIZE and MAX_STANDARD_TX_SIZE), this function
was preventing low fee transactions from ever being accepted.

With this function removed, we will now allow transactions in that range
with fees (including modifications via PrioritiseTransaction) below
the minRelayTxFee, provided that they have sufficient priority.
2015-12-02 12:59:30 -05:00
Suhas Daftuar
27fae3484c Use fee deltas for determining mempool acceptance 2015-12-02 12:59:30 -05:00
Suhas Daftuar
9ef2a25603 Update replace-by-fee logic to use fee deltas 2015-12-02 12:59:30 -05:00
Suhas Daftuar
eb306664e7 Fix mempool limiting for PrioritiseTransaction
Redo the feerate index to be based on mining score, rather than fee.

Update mempool_packages.py to test prioritisetransaction's effect on
package scores.
2015-12-02 12:59:30 -05:00
MarcoFalke
fab83476ac [qt] Use tr() instead of _()
Also, `make translate`
2015-12-02 17:25:59 +01:00
MarcoFalke
fabd10a9c9 Fix typo in wallet.cpp 2015-12-02 15:21:18 +01:00
paveljanik
5e151a842c PartitionCheck: remove useless spaces 2015-12-02 15:18:23 +01:00
Jorge Timón
fad0088e75 TRIVIAL: Chainparams: Remove unused CBaseUnitTestParams 2015-12-02 15:18:23 +01:00
antonio-fr
74f7341fec Update miner.cpp: Fix typo in comment 2015-12-02 15:18:23 +01:00
MarcoFalke
e69bad19f8 [trivial] Fix typo in peertablemodel.cpp 2015-12-02 15:18:23 +01:00
paveljanik
8a03727d9c Fix various typos 2015-12-02 15:18:22 +01:00
Wladimir J. van der Laan
df2ced5c83
Merge pull request #7128
02354c9 Constrain rpcport default values to a single location in code (Luke Dashjr)
2015-12-02 14:38:43 +01:00
Wladimir J. van der Laan
93236c0455
qt: Final translation update before 0.12 fork
- Add new translations (finally, after a long time)
- update-translation script was not considering new translations - oops
  - fixed this, also remove (nearly) empty translations
- Update translation process, it was still describing the old repository
  structure
2015-12-02 14:28:35 +01:00
Wladimir J. van der Laan
83f06ca937
Merge pull request #6216
db6047d Take the training wheels off anti-fee-sniping (Peter Todd)
2015-12-02 13:56:57 +01:00
Wladimir J. van der Laan
6e76587360 rpc: remove cs_main lock from createrawtransaction
This is a pure utility function that doesn't use
main's data structures, so it does not require that lock.
2015-12-02 13:42:47 +01:00
Wladimir J. van der Laan
7c7a05d274
Merge pull request #7147
9827091 Squashed 'src/univalue/' changes from 5839ac3..2740c4f (MarcoFalke)
2015-12-02 13:26:54 +01:00
Wladimir J. van der Laan
0dd194c917
Merge pull request #7146
1812de9 Name union to prevent compiler warning (Pavel Janík)
2015-12-02 12:58:25 +01:00
Wladimir J. van der Laan
8e598dc4ea
Merge pull request #7118
b212f94 Describe maxmempool and mempoolminfee in the getmempoolinfo RPC help. (Pavel Janík)
2015-12-02 12:44:04 +01:00
MarcoFalke
fad4ea836d Merge commit '982709199f1b4e9e35211c419a81938f9f1dd4ed' into bitcoin 2015-12-02 12:28:48 +01:00
Wladimir J. van der Laan
1b0241fcec
Merge pull request #7144
8f0d79e test: Disable scheduler test manythreads (Wladimir J. van der Laan)
2015-12-02 10:18:20 +01:00
Pavel Janík
1812de9091 Name union to prevent compiler warning 2015-12-02 08:40:47 +01:00
Jonas Schnelli
a3c3ddbd7b
[Qt] add InMempool() info to transaction details 2015-12-02 08:38:31 +01:00
Pieter Wuille
dd5862c4cd Flush coins cache also after transaction processing 2015-12-01 15:52:09 -08:00
Matt Corallo
bde953e281 Uncache input txn in utxo cache if a tx is not accepted to mempool 2015-12-01 15:52:09 -08:00
Matt Corallo
97bf377bd1 Add CCoinsViewCache::HaveCoinsInCache to check if a tx is cached 2015-12-01 15:52:09 -08:00
Matt Corallo
677aa3d88c Discard txn cache entries that were loaded for removed mempool txn 2015-12-01 15:52:07 -08:00
Matt Corallo
b2e74bd292 Get the set of now-uncacheable-txn from CTxMemPool::TrimToSize 2015-12-01 15:50:39 -08:00
Matt Corallo
74d0f90262 Add method to remove a tx from CCoinsViewCache if it is unchanged 2015-12-01 15:50:39 -08:00
Luke Dashjr
45b8e278fb -bytespersigop option to additionally limit sigops in transactions we relay and mine 2015-12-01 20:57:08 +00:00
Alex Morcos
553cad94e2 Rewrite CreateNewBlock
Use the score index on the mempool to only add sorted txs in order.  Remove much of the validation while building the block, relying on mempool to be consistent and only contain txs that can be mined.
The mempool is assumed to be consistent as far as not containing txs which spend non-existent outputs or double spends, and scripts are valid.  Finality of txs is still checked (except not coinbase maturity, assumed in mempool).
Still TestBlockValidity in case mempool consistency breaks and return error state if an invalid block was created.
Unit tests are modified to realize that invalid blocks can now be constructed if the mempool breaks its consistency assumptions and also updated to have the right fees, since the cached value is now used for block construction.

Conflicts:
	src/miner.cpp
2015-12-01 12:09:37 -05:00
Alex Morcos
5f12263302 Expose FormatStateMessage 2015-12-01 10:10:25 -05:00
Alex Morcos
1f09287c66 Make accessing mempool parents and children public 2015-12-01 10:10:25 -05:00
Alex Morcos
7230187b1d Add TxPriority class and comparator 2015-12-01 10:10:25 -05:00
Alex Morcos
f3fe83673e Add a score index to the mempool.
The score index is meant to represent the order of priority for being included in a block for miners.  Initially this is set to the transactions modified (by any feeDelta) fee rate.  Index improvements and unit tests by sdaftuar.
2015-12-01 10:10:25 -05:00
Alex Morcos
c49d5bc9e6 Store the total sig op count of a tx.
Store sum of legacy and P2SH sig op counts.  This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-12-01 10:10:25 -05:00