8830 Commits

Author SHA1 Message Date
MarcoFalke
142fbb2fec rpc: Rename first named arg of createrawtransaction
Github-Pull: #10084
Rebased-From: fa558532192ca0bb519f811ee14df6037413b89f
2017-03-27 23:44:08 +02:00
Suhas Daftuar
fc3d7db580 Optimize GetWitnessHash() for non-segwit transactions
Github-Pull: #9912
Rebased-From: 02c57b521a9e7afd4416cd027a8b397f202b08a8
2017-03-27 23:44:08 +02:00
Andrew Chow
ddc2dd1612 Ensure an item exists on the rpcconsole stack before adding
Ensures that there is an item on the rpcconsole stack before adding something to the current stack so that a segmentation fault does not occur.

Github-Pull: #10060
Rebased-From: 4df76e270caa9d828179cae1c7a8918d6f91ec21
2017-03-27 23:08:24 +02:00
James Evans
4d8e66017f Trivial: Fix typo in help getrawtransaction RPC
Github-Pull: #10037
Rebased-From: 05a9f22358be27c08f7e164d05eeeaf0386073cb
2017-03-27 23:07:56 +02:00
Wladimir J. van der Laan
ccb47bf830
Merge #10006: [0.14 backport] Don't require segwit in getblocktemplate for segwit signalling or mining
2cd2cd5 Test transaction selection when gbt called without segwit support (Suhas Daftuar)
569596c Don't require segwit in getblocktemplate for segwit signalling or mining (Suhas Daftuar)

Tree-SHA512: bf2672287713e5adc7e851791207e17490679f941d0b9ed38467ffede3aa3000d229151b8ae54323fc8037e0a8569b2fd910ec19f034fb85d9142289648793c3
2017-03-18 11:39:04 +01:00
Matt Corallo
4e2502bb51 Add missing braces in semaphore posts in net
Github-Pull: #9953
Rebased-From: 819b513a5415d1669b5440e214862cda6c2261f8
2017-03-17 14:56:57 -07:00
Matt Corallo
d2548a4f97 Fix shutdown hang with >= 8 -addnodes set
We previously would block waiting for a CSemaphoreGrant in
ThreadOpenAddedConnections, when we did not need to. This would
block as the posts in CConnman shutdown were both to the wrong
semaphore and in the wrong location.

Github-Pull: #9953
Rebased-From: e007b243c4840e44857b5ccf686ed35899e44af0
2017-03-17 14:55:43 -07:00
Suhas Daftuar
569596cc51 Don't require segwit in getblocktemplate for segwit signalling or mining
Segwit's version bit will be signalled for all invocations of CreateNewBlock,
and not specifying segwit only will cause CreateNewBlock to skip transactions
with witness from being selected.

Github-Pull: #9955
Rebased-From: abe7b3d3abe10e3554b770f40824174b3b217490
2017-03-16 10:43:54 -04:00
Russell Yanofsky
ad24256a65
Fix importmulti returning rescan errors for wrong keys
Bug was a missing ++i line in a new range for loop added in commit e2e2f4c
"Return errors from importmulti if complete rescans are not successful"

Github-Pull: #9829
Rebased-From: 306bd72157f089b962b9c537bbacf710a4158647
2017-02-28 13:53:28 +01:00
Wladimir J. van der Laan
8d2d08efaa
qt: pre-rc3 translations update 2017-02-28 12:49:29 +01:00
Pieter Wuille
1825a03f81
Avoid VLA in hash.h
Github-Pull: #9791
Rebased-From: 5c8fd508112016c3821b71112270afe83e6949ac
2017-02-28 12:48:19 +01:00
Marijn Stollenga
289204fbe0
Change bitcoin address in RPC helpaddress to an invalid address, so people don't accidentally send coins there (like I did).
Github-Pull: #9865
Rebased-From: 83ac719d34f98cc1d3efa6ece2b95145bcde8775
2017-02-28 12:01:06 +01:00
Russell Yanofsky
08e0690f3f
Update sendfrom RPC help to correct coin selection misconception
Github-Pull: #9840
Rebased-From: f81f0d003079b96b8c33d3dfe76f90e50344bcd8
2017-02-28 11:41:58 +01:00
Cory Fields
775cf54d0e
prevector: assert successful allocation
Github-Pull: #9856
Rebased-From: d4ee7baef729da5e18b5e5c3d6ddb5b97df8d4e4
2017-02-28 11:40:50 +01:00
Cory Fields
69832aaad5
don't throw std::bad_alloc when out of memory. Instead, terminate immediately
Github-Pull: #9856
Rebased-From: c5f008a4166bae4350881a74fc04a87d7a5c4ed5
2017-02-28 11:40:50 +01:00
Wladimir J. van der Laan
50953c2aad
tests: Fix dangling pwalletMain pointer in wallet tests
Github-Pull: #9875
Rebased-From: 75a109338fbbe9a30c54d76010b538c8ac1080ac
2017-02-28 11:40:50 +01:00
Wladimir J. van der Laan
847e3753a6
qt: pre-rc2 translations update 2017-02-23 20:31:57 +01:00
Cory Fields
05e906dbc6
build: add --enable-werror option
This turns some compiler warnings into errors. Useful for c-i.

Github-Pull: #9789
Rebased-From: 205830a37b7ffa4f8fa306e5c9eafcee3777fa68
2017-02-23 10:49:07 +01:00
John Newbery
9d3f9d2a59
[Trivial] Remove incorrect help message from gettxoutproof()
Github-Pull: #9711
Rebased-From: 9949ebfa6a548260858df429f4d0e716e0a26065
2017-02-22 13:03:55 +01:00
Russell Yanofsky
9072395e5f
Return errors from importmulti if complete rescans are not successful
Github-Pull: #9773
Rebased-From: e2e2f4c856363bbb0e3b5ba4df225f3754c3db39
2017-02-22 12:45:43 +01:00
Jonas Schnelli
7d75a5a93c
Fix segfault crash when shutdown the GUI in disablewallet mode
Github-Pull: #9817
Rebased-From: 312c4f10574ccf6dfe0d4ecb3ce928733d3a1e52
2017-02-21 15:14:17 +01:00
kirit93
e22c0671c7
Fix for issue #9775. Added check for open() returning a NULL pointer.
Github-Pull: #9798
Rebased-From: 40f11f8872c3e9f380f8278f984dfdabffe77539
2017-02-21 14:33:34 +01:00
Pavel Janík
3972a8efb2
Read/write mempool.dat as a binary.
mempool.dat is a binary file and thus it should be read/written as such.

Fixes #9810.

Github-Pull: #9813
Rebased-From: 171fc91f061d4a980eedfa522e302b8598408cc5
2017-02-21 12:35:38 +01:00
Luke Dashjr
6552729f38
Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activates
Github-Pull: #9619
Rebased-From: 9fc7f0bce94f1cea0239b1543227f22a3f3b9274
2017-02-20 17:32:59 +01:00
Russell Yanofsky
40c754cb38
[wallet] Remove importmulti always-true check
Remove "nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()" check from
importmulti, which is always true because nLowestTimestamp is set to the
minimum of the most recent block time and all the imported key timestamps,
which is necessarily lower than the maximum block time.

Github-Pull: #9760
Rebased-From: ec1267f13b7d0b9b5058c6821cf8dbf74e02d17c
2017-02-20 17:30:26 +01:00
Cory Fields
2afefeade6
boost: remove iostreams includes
They're unused and produce nasty deprecation warnings

Github-Pull: #9786
Rebased-From: 3301587dc5c7937141282f3799592d1e398495fb
2017-02-17 21:50:30 +01:00
Pieter Wuille
973e345f7f
Move BIP70_MAX_PAYMENTREQUEST_SIZE to header
Github-Pull: #9785
Rebased-From: c801c82e253dc4956069b6110f65b43f538dd5a1
2017-02-17 21:50:22 +01:00
Pieter Wuille
f873564231
Make KEY_SIZE a compile-time constant
Github-Pull: #9785
Rebased-From: 914fad155d9fc76b42b3a0414dd14b5ebc36062f
2017-02-17 21:50:14 +01:00
Wladimir J. van der Laan
f68e4414d7
qt: pre-rc1 translations update 2017-02-17 17:43:06 +01:00
Wladimir J. van der Laan
bc69f34b35
build: bump version to 0.14.0 2017-02-17 17:24:00 +01:00
Wladimir J. van der Laan
9828f9a996
Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescans
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky)
38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky)
c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky)
8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2017-02-17 12:53:41 +01:00
Wladimir J. van der Laan
ad168ef4e3
Merge #9778: Add two hour buffer to manual pruning
91fb506 Add two hour buffer to manual pruning (Alex Morcos)
2017-02-17 12:51:08 +01:00
Wladimir J. van der Laan
3c02b95740
Merge #9779: Update nMinimumChainWork and defaultAssumeValid.
3f78e46 Update nMinimumChainWork and defaultAssumeValid. (Gregory Maxwell)
2017-02-17 12:41:49 +01:00
Wladimir J. van der Laan
8dee822177
Merge #9777: Handle unusual maxsigcachesize gracefully
55c403b Ensure `-maxsigcachesize` is in valid range (John Newbery)
2017-02-17 09:05:48 +01:00
John Newbery
55c403b8fe Ensure -maxsigcachesize is in valid range
- If the -maxsigcachesize parameter is set to zero, setup a minimum sized
sigcache (2 elements) rather than segfaulting.
- Handle maxsigcachesize being negative
- Handle maxsigcachesize being too large
2017-02-17 09:04:37 +01:00
Alex Morcos
91fb506e0a Add two hour buffer to manual pruning 2017-02-16 17:47:56 -05:00
Gregory Maxwell
3f78e460ba Update nMinimumChainWork and defaultAssumeValid. 2017-02-16 19:31:03 +00:00
Russell Yanofsky
e662af3583 Use 2 hour grace period for key timestamps in importmulti rescans
Gregory Maxwell <greg@xiph.org> pointed out the lack of grace period in
https://github.com/bitcoin/bitcoin/pull/9490#issue-199407998.

The importwallet RPC which uses key timestamps in a similar way already has a 2
hour grace period.
2017-02-16 09:05:55 -05:00
Wladimir J. van der Laan
8743320d6c
Merge #9763: [Trivial] Update comments referencing main.cpp
00e623d [Trivial] Update comments referencing main.cpp (CryptAxe)
2017-02-16 14:01:14 +01:00
CryptAxe
00e623d0b8 [Trivial] Update comments referencing main.cpp 2017-02-16 13:52:38 +01:00
Wladimir J. van der Laan
e43a58514d
Merge #9771: Add missing cs_wallet lock that triggers new lock held assertion
07afcd6 Add missing cs_wallet lock that triggers new lock held assertion (Russell Yanofsky)
2017-02-16 10:30:33 +01:00
Wladimir J. van der Laan
f8af89a918
Merge #9764: wallet: Prevent "overrides a member function but is not marked 'override'" warnings
6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)
2017-02-16 10:24:24 +01:00
Wladimir J. van der Laan
1e92e041dd
Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
2017-02-16 10:23:41 +01:00
Russell Yanofsky
07afcd6379 Add missing cs_wallet lock that triggers new lock held assertion
A new AssertLockHeld(cs_wallet) call was added in commit a58370e
"Dedup nTimeFirstKey update logic" (part of PR #9108).

The lock held assertion will fail when loading prexisting wallets files from
before the #9108 merge that have watch-only keys.
2017-02-15 17:01:30 -05:00
Wladimir J. van der Laan
7a93af8340
Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
2017-02-15 16:29:16 +01:00
Wladimir J. van der Laan
476cc47da0
Merge #9758: Selectively suppress deprecation warnings
4b6cccc Selectively suppress deprecation warnings (Jonas Schnelli)
2017-02-15 15:08:59 +01:00
Suhas Daftuar
ba803efb68 Harden against mistakes handling invalid blocks
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect
arguments, and restores a call to CheckBlock() from ProcessNewBlock()
as belt-and-suspenders.

Updates the (overspecified) tests to match behavior.
2017-02-15 08:17:57 -05:00
Wladimir J. van der Laan
6c5427d24c wallet: Prevent "overrides a member function but is not marked 'override'" warnings
Because it is used inconsistently at least version 5.4.0 of g++ to
complains about methods that don't use override. There is two ways to go
about this: remove override from the methods having it, or add it to the
methods missing it. I chose the second.
2017-02-15 11:31:28 +01:00
Wladimir J. van der Laan
d8e8b06bd0
Merge #9108: Use importmulti timestamp when importing watch only keys (on top of #9682)
a80f98b Use importmulti timestamp when importing watch only keys (Russell Yanofsky)
a58370e Dedup nTimeFirstKey update logic (Russell Yanofsky)
2017-02-15 11:13:48 +01:00
Wladimir J. van der Laan
4c69d683f2
Merge #9553: Use z = std::max(x - y, 0) instead of z = x - y; if (z < 0) z = 0;
a47da4b Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; (practicalswift)
2017-02-15 09:27:47 +01:00