Commit graph

18201 commits

Author SHA1 Message Date
Wladimir J. van der Laan
623a19bc2b
Merge #15053: [0.17] Backport #14966
b4602e3240 fix testmempoolaccept CLI syntax (1Il1)

Pull request description:

  Backports #14966 to the 0.17 branch.

Tree-SHA512: 91ab186d612a11454d1a7cbe6d4251813e42eb438b5e2e0e1dfdb76c352d866fd4d5f04cc0cb696ffb7585f24babbfeb79e73481cc669e4b944712a743e822d3
2018-12-30 17:34:14 +01:00
João Barbosa
27beb83222 qt: All tray menu actions call showNormalIfMinimized
Github-Pull: #14123
Rebased-From: 0a656f85a9
2018-12-30 11:23:39 +00:00
João Barbosa
c470bbd19d qt: Use GUIUtil::bringToFront where possible
Github-Pull: #14123
Rebased-From: 6fc21aca6d
2018-12-30 11:23:16 +00:00
João Barbosa
ac73c7d433 qt: Add GUIUtil::bringToFront
Github-Pull: #14123
Rebased-From: 5796671e1d
2018-12-30 11:22:20 +00:00
Hennadii Stepanov
0c2fb87dc1 Remove obj_c for macOS Dock icon menu
Qt `setAsDockMenu()` does this work.

Github-Pull: #14597
Rebased-From: 6b1d2972bf
2018-12-30 11:21:54 +00:00
Hennadii Stepanov
90347141bd Use Qt signal for macOS Dock icon click event
This moves the Dock icon click reaction code to the common place and
allows some cleanup in obj_c code.

According to the Apple's docs `class_replaceMethod` behaves as
`class_addMethod`, if the method identified by name does not yet exist;
or as `method_setImplementation`, if it does exist.

Github-Pull: #14597
Rebased-From: 2464925e7b
2018-12-30 11:21:15 +00:00
Hennadii Stepanov
4d4bc37df9 Remove obj_c for macOS Dock icon setting
Qt `setWindowIcon()` does this work.

Github-Pull: #14597
Rebased-From: 53bb6be3f8
2018-12-30 00:23:47 +00:00
Hennadii Stepanov
d2ed162ce0 Clean systray icon menu for -disablewallet mode
Ref #3392

Github-Pull: #14383
Rebased-From: 36323e2ac6
2018-12-30 00:20:18 +00:00
João Barbosa
298dc15686 gui: Favor macOS show / hide action in dock menu
Github-Pull: #14133
Rebased-From: ee3a494f37
2018-12-30 00:19:18 +00:00
MarcoFalke
fa941016e8
Merge #15055: [0.17] Backport #14944
b138b4abff doc: update NetBSD build instructions for 8.0 (fanquake)

Pull request description:

  Backports #14944 to the 0.17 branch.

Tree-SHA512: b169ff9c42cca3573b972b43adaf0556d5a198a755cd4c1a69c4c557b7cab6cf977c24d575c8802869d157d2bb0dff76c5d7f1e7647a58a4670f252614dab421
2018-12-29 13:45:23 +01:00
fanquake
b138b4abff
doc: update NetBSD build instructions for 8.0
Github-Pull: #14944
Rebased-From: be5ca825a3
2018-12-29 17:31:34 +08:00
1Il1
b4602e3240
fix testmempoolaccept CLI syntax
`testmempoolaccept "hexstring"` will give a "JSON parse error". The correct syntax is `testmempoolaccept \[\"hexstring\"\]` (but seems escaping is not displayed in other areas so leaving backspaces out).

Github-Pull: #14966
Rebased-From: b74a52192b
2018-12-29 17:15:55 +08:00
bitcoinhodler
fa0c76adee
Fix minor grammar error in doc
Github-Pull: #15012
Rebased-From: 72b63bc905
2018-12-28 18:58:38 +08:00
priscoan
88c566a13f
doc: Fix PSBT howto and example parameters
* Remove outdated reference to replaceable parameter
* Fix address reference
* Unify quotation and italicization of parameters
* Fix PSBT reference

Github-Pull: #14319
Rebased-From: 78542a3f36
2018-12-28 18:58:38 +08:00
Pieter Wuille
ddd008dbef
Add PSBT documentation
Github-Pull: #13941
Rebased-From: 19efc01aec
2018-12-28 18:58:38 +08:00
Wladimir J. van der Laan
fd616d8d08
doc: Clean out release notes post-0.17.1
Tree-SHA512: 0cd6e97156da2dea9a9b557083d8140c17f85f6e718d5fcb73aa67460480b6437b665fad147bf4eacd13570aeb25a29f28c35b7fb0365ae630b2edf05901a431
2018-12-25 10:21:54 +01:00
MarcoFalke
e11856515e
Merge #14893: 0.17 [Backport 14890] rpc: Avoid creating non-standard raw transactions
46c162df47 rpc: Avoid creating non-standard raw transactions (MarcoFalke)

Pull request description:

Tree-SHA512: f34678637c8b6559e5c0c2790b682af562479239b92be96e0d41806bade136866f9748487a021eb8c62b6a5027b0a1a2cbdee930243eac93edabef60cbd54eac
2018-12-24 13:06:32 +01:00
MeshCollider
a057cc08fd
Merge #14900: [backport] #14679 importmulti: Don't add internal addresses to address book
ae1b6756c importmulti: Don't add internal addresses to address book (Gregory Sanders)

Pull request description:

Tree-SHA512: 749e4864862bc3402a0fad200578804ce6577b4d954fd3e741191b4c941df28d54f98422f90e7fdf9bdf9c01e53ec36cf970e61d22ccc0478771285dd8cef6a0
2018-12-25 00:12:44 +13:00
Gregory Sanders
ae1b6756c9
importmulti: Don't add internal addresses to address book
Github-Pull: #14679
Rebased-From: 7afddfa8ce
2018-12-09 22:32:45 +08:00
MarcoFalke
46c162df47 rpc: Avoid creating non-standard raw transactions
Github-Pull: #14890
Rebased-From: fa4c8679ed
2018-12-07 11:36:29 -05:00
Wladimir J. van der Laan
ef70f9b52b
doc: Fill in authors and changelog for 0.17.1 release notes
Tree-SHA512: dc23ae43e81ad379b48bb8dc6da21cde647a7edc778563b8b8266dfe84d9baa70bf4565915e276ea0e14aa96ce677547494da0aadeebfcc961f53430c7bb84ea
2018-12-07 00:29:45 +01:00
Wladimir J. van der Laan
c6e4a1fca5
Merge #14889: [0.17] Backport #14424 (Stop requiring imported pubkey to sign non-PKH schemes)
89a9a9d938 Stop requiring imported pubkey to sign non-PKH schemes (Pieter Wuille)

Pull request description:

  Github-Pull: #14424
  Rebased-From: 2f6b466aeb

Tree-SHA512: 1ea10dee66626f04918f197cd7c4949a836fa49c8f676f276b2328f8d79389059db7b30fc04d4c4bf8209f6a8d21f3ea49a017ddc7623eca6b7e6efc2fe0d749
2018-12-07 00:10:06 +01:00
Pieter Wuille
89a9a9d938 Stop requiring imported pubkey to sign non-PKH schemes
Github-Pull: #14424
Rebased-From: 2f6b466aeb
2018-12-07 10:30:22 +13:00
MarcoFalke
abae8aeff1
Merge #14880: 0.17: Backport #14453
dcb032dcdf qa: Ensure wallet unload during walletpassphrase timeout (João Barbosa)
75b5d8c4ea rpc: Fix wallet unload during walletpassphrase timeout (João Barbosa)

Pull request description:

  Backport #14453 to 0.17

Tree-SHA512: fce0adccbb07b6635bb773a71beb4a9b814bceb77bbe7bbc5bcb7d151aabb1148c791622f58c990afe202012ca1971cd466cb536fc6f37e22cdc58738720b593
2018-12-06 13:07:25 -05:00
Wladimir J. van der Laan
8b8b3a9a5f
Merge #14878: 0.17: Further backports
7a590d8390 fix converttopsbt permitsigdata arg, add basic test (Gregory Sanders)

Pull request description:

  Ooff, we missed some backports that were tagged.

  Checked:

  * In 7a590d8 (clean cherry-pick): The test changes fail without the code changes

Tree-SHA512: 9996886113dfcd8efa91f5436bc0f3507c81579861543611367bc3403868019fb1e45832c3f994f12278edb1c0c850e21f2f88e46a6981f45a11c4d61dcedaf9
2018-12-06 15:18:39 +01:00
João Barbosa
dcb032dcdf qa: Ensure wallet unload during walletpassphrase timeout
0.17 branch doesn't include #12493 which changed encryptwallet behavior. For that
reason the test is adjusted.

Github-Pull: #14453
Rebased-From: 8907df9
2018-12-06 11:45:18 +00:00
Wladimir J. van der Laan
6042dfe008
build: bump version to 0.17.1
Also update man pages.

Tree-SHA512: 826f3c9ad1e49902ee2f1710a4329388c0a9298a359971f21130bf8f390d4a7b744d010f04eb109666ceb28d0053b9fa7ec088caaa4e4cc38509526457086d40
2018-12-06 11:41:25 +01:00
João Barbosa
75b5d8c4ea rpc: Fix wallet unload during walletpassphrase timeout
Github-Pull: #14453
Rebased-From: 321decf
2018-12-05 23:14:10 +00:00
Gregory Sanders
7a590d8390 fix converttopsbt permitsigdata arg, add basic test
Github-Pull: #14356
Rebased-From: 88a79cb436
2018-12-05 17:38:57 -05:00
MarcoFalke
5d12143c73
Merge #14780: PSBT backports to 0.17
7bee41452b Add test for conversion from non-witness to witness UTXO (Pieter Wuille)
ff56bb9b44 Add regression test for PSBT signing bug #14473 (Glenn Willen)
db445d4e5a Refactor PSBTInput signing to enforce invariant (Glenn Willen)
ad94165db9 Simplify arguments to SignPSBTInput (Glenn Willen)
39ece4fc28 Add bool PSBTInputSigned (Glenn Willen)
70ee1f8709 New PartiallySignedTransaction constructor from CTransction (Glenn Willen)
a9eab081d5 Remove redundant txConst parameter to FillPSBT (Glenn Willen)
cfdd6b2f6c More concise conversion of CDataStream to string (Glenn Willen)
a3fe125490 check that a separator is found for psbt inputs, outputs, and global map (Andrew Chow)

Pull request description:

  This is a backport of #14588, #14377, and #14197's test to 0.17.

Tree-SHA512: 07535ec69a878a63b549e5e463345e233f34662dff805202614cf2ffc896c6d1981363e6d06d02db2e02d815075ad8ebdc5f93f637052cff8c8cbe6c8dfa096a
2018-12-05 10:35:31 -05:00
Pieter Wuille
7bee41452b Add test for conversion from non-witness to witness UTXO
Github-Pull: #14197
Rebased-From: 862d159d63
2018-12-03 10:37:52 -08:00
Glenn Willen
ff56bb9b44 Add regression test for PSBT signing bug #14473
Github-Pull: #14588
Rebased-From: e13fea975d
2018-12-03 10:37:22 -08:00
Glenn Willen
db445d4e5a Refactor PSBTInput signing to enforce invariant
Refactor the process of PSBTInput signing to enforce the invariant that
a PSBTInput always has _either_ a witness_utxo or a non_witness_utxo,
never both.

This simplifies the logic of SignPSBTInput slightly, since it no longer
has to deal with the "both" case. When calling it, we now give it, in
order of preference: (1) whichever of the utxo fields was already
present in the PSBT we received, or (2) if neither, the
non_witness_utxo field, which is just a copy of the input transaction,
which we get from the wallet.

SignPSBTInput no longer has to remove one of the two fields; instead, it
will check if we have a witness signature, and if so, it will replace
the non_witness_utxo with the witness_utxo (which is smaller, as it is
just a copy of the output being spent.)

Add PSBTInput::IsSane checks in two more places, which checks for
both utxo fields being present; we will now give an RPC error early on
if we are supplied such a malformed PSBT to fill in.

Also add a check to FillPSBT, to avoid touching any input that is
already signed. (This is now redundant, since we should no longer
potentially harm an already-signed input, but it's harmless.)

fixes #14473

Github-Pull: #14588
2018-12-03 10:37:08 -08:00
Glenn Willen
ad94165db9 Simplify arguments to SignPSBTInput
Remove redundant arguments to SignPSBTInput -- since it needs several
bits of the PartiallySignedTransaction, pass in a reference instead of
doing it piecemeal. This saves us having to pass in both a PSBTInput and
its index, as well as having to pass in the CTransaction. Also avoid
redundantly passing the sighash_type, which is contained in the
PSBTInput already.

Github-Pull: #14588
Rebased-From: 0f5bda2bd9
2018-12-03 10:36:37 -08:00
Glenn Willen
39ece4fc28 Add bool PSBTInputSigned
Refactor out a "PSBTInputSigned" function to check if a PSBT is signed,
for use in subsequent commits.

Also improve a related comment.

GitHub-Pull: #14588
Rebased-From: 53e6fffb8f
2018-12-03 10:36:08 -08:00
Glenn Willen
70ee1f8709 New PartiallySignedTransaction constructor from CTransction
New constructor that creates a PartiallySignedTransaction from a
CTransaction, automatically sizing the inputs and outputs vectors for
convenience.

Github-Pull: #14588
Rebased-From: 65166d4cf8
2018-12-03 10:35:34 -08:00
Glenn Willen
a9eab081d5 Remove redundant txConst parameter to FillPSBT
Github-Pull: #14588
Rebased-From: 4f3f5cb4b1
2018-12-03 10:34:57 -08:00
Glenn Willen
cfdd6b2f6c More concise conversion of CDataStream to string
Use .str() instead of .data() and .size() when converting CDataStream to
a string. Uses std::string, avoiding conversion to a C string.

Github-Pull: #14588
Rebased-From: fe5d22bc67
2018-12-03 10:34:20 -08:00
Andrew Chow
a3fe125490 check that a separator is found for psbt inputs, outputs, and global map
Github-Pull: #14377
Rebased-From: 4fb3388db9
2018-12-03 10:32:58 -08:00
MarcoFalke
3362a95be3
Merge #14196: [0.17][psbt] always drop the unnecessary utxo and convert non-witness utxo to witness when necessary
fcefc6851a Convert non-witness UTXOs to witness if witness sig created (Andrew Chow)
fcdea8ad2a Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet things (Andrew Chow)

Pull request description:

  When we sign an input in a psbt that has a non-witness utxo but a witness signature is produced, we will now replace the non-witness utxo with the corresponding witness utxo. Furthermore, we should make sure that the correct UTXO type is used based on what UTXOs are there, not based on earlier wallet behavior.

  Note that this is PR'd to the 0.17 branch because the code here no longer exists in master.

Tree-SHA512: 882e9e4e9b77d6ac1743c35c0d59023aad6f4f19193398f97f2c6b81f6627d74e5220b1d674a0edba1ff2fc2a7f61afbf838d3faf0a964fccd3dee97c631aa47
2018-12-01 12:31:14 -05:00
MarcoFalke
924cf794e1
Merge #14851: [backport] fix assert crash when specified change output spend size is unknown
2a5cc40dc4 CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown change (Gregory Sanders)
53dcf2b407 Remove stale comment in CalculateMaximumSignedInputSize (Gregory Sanders)

Pull request description:

  backport of #14380

Tree-SHA512: 42e261bd797d1938f8e041ccd10073ecd1d72695e2e4ce322e5a3ce262647e32108b01dde73361b6d2ac36438522ab3c4cd58ca072194f25011132437430cd27
2018-11-30 16:09:53 -05:00
MarcoFalke
252844329f
Merge #14852: 0.17 backport: [tests] Add wallet_balance.py
67225e2fd7 [tests] Add wallet_balance.py (John Newbery)

Pull request description:

Tree-SHA512: 5a8707ddc7e11ac0b7b7dc27a73668acc7ff53f832d94a85930a28329ec5271da2b469e2b51d66746fa6ab54aa0221d49d215ec3434ea619352fcbacbb252883
2018-11-30 11:50:20 -05:00
John Newbery
67225e2fd7 [tests] Add wallet_balance.py
Adds a test specifically to test the wallet's getbalance and
getunconfirmedbalance RPCs.

Github-Pull: #14845
Rebased-From: c1825b9d39
2018-11-30 11:25:20 -05:00
Gregory Sanders
2a5cc40dc4 CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown change 2018-11-30 11:08:41 -05:00
Gregory Sanders
53dcf2b407 Remove stale comment in CalculateMaximumSignedInputSize 2018-11-30 11:08:35 -05:00
MarcoFalke
d8bc0ce1da
Merge #14835: [0.17] Further Backports
f9db08e8ca qa: Avoid race in p2p_invalid_block by waiting for the block request (MarcoFalke)
79358817e5 Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986) (practicalswift)
9666dbaf09 rpc: Make HTTP RPC debug logging more informative (practicalswift)
b90157891a add test demonstrating addrLocal UB (Kaz Wesley)
6f04264bbb fix uninitialized read when stringifying an addrLocal (Kaz Wesley)
5782fdcd8c Throw error if CPubKey is invalid during PSBT keypath serialization (Gregory Sanders)
de5e48a461 Bugfix: RPC: Add address_type named param for createmultisig (Luke Dashjr)
df5131bd41 gui: explicitly disable "Dark Mode" appearance on macOS (fanquake)

Pull request description:

  Backports #14593, #14596, #14618, #14690 and #14728 to the 0.17 branch.

Tree-SHA512: fcda4b75fcb71bb80cc8bde2a2b98ff5c0239dfa754ac980b1a91a90409502ac7678326399a4fc03a773074339dbf8b3d11750c91fe4302741a954745acfcca1
2018-11-30 10:39:27 -05:00
MarcoFalke
f9db08e8ca
qa: Avoid race in p2p_invalid_block by waiting for the block request
Github-Pull: #14700
Rebased-From: fa21568208
2018-11-30 22:40:57 +08:00
practicalswift
79358817e5
Add SAFE_CHARS[SAFE_CHARS_URI]: Chars allowed in URIs (RFC 3986)
Github-Pull: #14618
Rebased-From: ab8c6f24d2
2018-11-29 18:34:58 +08:00
practicalswift
9666dbaf09
rpc: Make HTTP RPC debug logging more informative
Github-Pull: #14618
Rebased-From: 991248649b
2018-11-29 18:34:15 +08:00
Kaz Wesley
b90157891a
add test demonstrating addrLocal UB
Github-Pull: #14728
Rebased-From: 8ebbef0169
2018-11-29 18:32:48 +08:00