1578 Commits

Author SHA1 Message Date
Adrian Gallagher
a02856e36a
Litecoin: Adjust fee system 2020-04-28 22:57:03 -07:00
Adrian Gallagher
280703b9d9
Litecoin: More branding 2020-04-16 00:09:57 -07:00
Adrian Gallagher
2c47be0012
Litecoin: TO-DO disable assumevalid 2020-04-16 00:09:55 -07:00
Adrian Gallagher
dbd2631aa6
Litecoin: Multisig code testing 2020-04-16 00:09:55 -07:00
Xinxi Wang
f78850b0ca
Litecoin: M prefix added for script addresses 2020-04-16 00:09:55 -07:00
Adrian Gallagher
29afca4a14
Litecoin: Adjust regtest addr 2020-04-16 00:09:54 -07:00
Adrian Gallagher
888f850da8
Litecoin: Fix more functional tests 2020-04-16 00:09:54 -07:00
Adrian Gallagher
6696ad5002
Litecoin: Fix various tests 2020-04-16 00:08:40 -07:00
Adrian Gallagher
d6edf09805
Litecoin: Disable RBF 2020-04-16 00:08:39 -07:00
Adrian Gallagher
35099b435f
Litecoin: Fix various tests 2020-04-16 00:08:34 -07:00
Adrian Gallagher
ec7aad5ba4
Litecoin: Branding 2020-04-16 00:08:34 -07:00
Adrian Gallagher
61a1fde6fe
Litecoin: Protocol and default settings
0) Adjust BIP30 enforcement values

1) Reduce amount that peers can adjust our time to eliminate an attack vector. Thanks to
coblee for this fix.

2) Zeitgeist2 patch - thanks to Lolcust and ArtForz. This fixes an issue where a
51% attack can change difficulty at will. Go back the full period unless it's the
first retarget after genesis.

3) Avoid overflow in CalculateNextWorkRequired(). Thanks to pooler for the overflow fix.

4) Zeitgeist2 bool fshift bnNew.bits(). Thanks to romanornr for this path.

5) SegWit ContextualCheckBlockHeader adjustment and extra coverage.

6) Reject peer proto version below 70002. Thanks to wtogami for this patch.

7) Send final alert message to nodes warning about removal of the alert system. Thanks to coblee for this patch.

8) Adjust default settings for Litecoin.

9) Adjust STALE_CHECK_INTERVAL value
2020-04-16 00:06:31 -07:00
Adrian Gallagher
3696e07db5
Litecoin: Fix various tests 2020-04-16 00:03:14 -07:00
Andrew Chow
b12defc3bc
Test that joinpsbts randomly shuffles the inputs
Github-Pull: #16512
Rebased-From: c0b5d9710322a614a50ab5da081558cf6a38ad2a
2019-09-24 07:53:29 +08:00
Luke Dashjr
9fe8d283e0
Bugfix: QA: Run tests with UPnP disabled
Needed for builds configured with --enable-upnp-default

Github-Pull: #16646
Rebased-From: b168dd30cf71ac176e271bc610b0b1a79ceaf075
2019-09-24 07:53:29 +08:00
MarcoFalke
9d389d09ed
util: No translation of Bitcoin Core in the copyright
Github-Pull: #16291
Rebased-From: fa64b947bb3075ff8737656706b941af691908ab
2019-09-24 07:53:28 +08:00
MarcoFalke
d3b3bb8c9f 0.18: test: Add test for maxtxfee option
Github-Pull: #16322
Rebased-From: 0d101a340c44841cbbc5982d55354b1787bc39e2
2019-08-25 02:51:50 +01:00
João Barbosa
a11dbaa547 0.18: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Github-Pull: #16322
Rebased-From: 5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7
2019-08-25 02:51:07 +01:00
Sjors Provoost
8f354ced6e 0.18: [wallet] abort when attempting to fund a transaction above maxtxfee
FundTransaction calls GetMinimumFee which, when the fee rate is absurdly high, quietly reduced the fee to -maxtxfee. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior.

Github-Pull: #16257
Rebased-From: 806b0052c3b45415862f74f20ba5f389e5b673de
2019-08-25 02:48:30 +01:00
Sjors Provoost
576580fe8a
[test] walletcreatefundedpsbt: check RBF is disabled when -walletrbf=0 2019-08-17 12:52:50 +02:00
Sjors Provoost
ee950ec465
[rpc] walletcreatefundedpsbt: use wallet default RBF 2019-08-17 12:52:50 +02:00
Anthony Towns
1dc357dabb signrawtransactionwithkey: report error when missing redeemScript/witnessScript param
Github-Pull: #16250
Rebased-From: 01174596e69568c434198a86f54cb9ea6740e6c2
2019-07-05 14:45:04 +10:00
John Newbery
af25a757e0 Add comments to Python ECDSA implementation
Github-Pull: #15826
Rebased-From: b67978529ad02fc2665f2362418dc53db2e25e17
2019-06-26 09:25:13 -04:00
Andrew Chow
e78007fc1a Make and get the multisig redeemscript and destination in one function instead of two
Instead of creating a redeemScript with CreateMultisigRedeemscript and
then getting the destination with AddAndGetDestinationForScript, do
both in the same function.

CreateMultisigRedeemscript is changed to AddAndGetMultisigDestination.
It creates the redeemScript and returns it via an output parameter. Then
it calls AddAndGetDestinationForScript to add the destination to the
keystore and get the proper destination.

This allows us to inspect the public keys in the redeemScript before creating
the destination so that the correct destination is used when uncompressed
pubkeys are in the multisig.

Github-Pull: #16026
Rebased-From: a49503402b6bc21e3878e151c07529941d36aed0
2019-06-21 08:51:41 -04:00
Pieter Wuille
d9fc969e71 Pure python EC
This removes the dependency on OpenSSL for the interaction tests, by providing a pure-Python
toy implementation of secp256k1.

Github-Pull: #15826
Rebased-From: 8c7b9324ca3f3ffb178bea56a96ea23f7e0383cb
2019-06-21 08:51:41 -04:00
MarcoFalke
23ba460c1a test: Add test that addmultisigaddress fails for watchonly addresses
Github-Pull: #15831
Rebased-From: fab6a0a659bb856e4598af3e0679fc37d5239478
2019-06-21 08:17:20 -04:00
MarcoFalke
13b3bb5644 test: Fixup creatmultisig documentation and whitespace
Github-Pull: #15831
Rebased-From: fad81d870aa6dd25d4fab5faad4c956ba364734a
2019-06-21 08:17:19 -04:00
MarcoFalke
79745d1752 Replace remaining fprintf with tfm::format manually
Github-Pull: #16205
Rebased-From: fa8f195195945ce6258199af0461e3fbfbc1236d
2019-06-18 15:50:40 -04:00
MarcoFalke
0023c97890 rpc: bugfix: Properly use iswitness in converttopsbt
Also explain the param in all RPCs

Github-Pull: #15899
Rebased-From: fa499b5f027f77c0bf13699852c8c06f78e27bef
2019-06-18 09:34:10 -04:00
Luke Dashjr
832eb4ff54 Bugfix: test/functional/rpc_psbt: Correct test description comment
Github-Pull: #14818
Rebased-From: c87fc71f7e9316bcc0653cd86c50177424b5b1f9
2019-06-18 09:34:06 -04:00
Luke Dashjr
966d8d0842 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions
When converttopsbt is called with a signed transaction, it either fails with "TX decode failed" if one or more inputs were segwit, or "Inputs must not have scriptSigs and scriptWitnesses" otherwise.
Since no effort is made by the test to ensure the inputs are segwit or not, avoid checking the exact message used.
The error code is still checked to ensure it is of the correct kind of failure.

Github-Pull: #14818
Rebased-From: 097c4aa379f255639ce0084702693fa72a595d6b
2019-06-18 09:34:04 -04:00
João Barbosa
592016ba18 fixup: Fix prunning test
Github-Pull: #15991
Rebased-From: f402012ccfc596d7d94851dabbf386c278ff5335
2019-06-14 16:01:37 -04:00
MarcoFalke
b6c1f9478f Disallow extended encoding for non-witness transactions (take 3)
Github-Pull: #16021
Rebased-From: fa2b52af32f6a4b9c22c270f36e92960c29ef364
2019-05-20 12:25:27 -04:00
Gregory Sanders
86031083c7 Add test for superfluous witness record in deserialization
Github-Pull: #15893
Rebased-From: cc556e4a30b4a32eab6722f590489d89b2875de3
2019-05-20 12:25:06 -04:00
Gregory Sanders
5a58ddb6d5 Fix missing input template by making minimal tx
Github-Pull: #15893
Rebased-From: 25b078658139c1aea58393a32ac5a79144d8d140
2019-05-20 12:24:03 -04:00
MarcoFalke
3460555f47 test: Add test for p2p_blocksonly
Github-Pull: #15990
Rebased-From: fa320de79faaca2b088fcbe7f76701faa9bff236
2019-05-16 16:15:51 -04:00
MarcoFalke
8f215c7a27 test: Format predicate source as multiline on error
Github-Pull: #15990
Rebased-From: fa3872e7b4540857261aed948b94b6b2bfdbc3d1
2019-05-16 16:15:49 -04:00
Pieter Wuille
235550d019 Take non-importing keys into account for spendability warning in descriptor import
Github-Pull: #15749
Rebased-From: b5d39877242504160a7f2c24c60c07a845d7a064
2019-04-16 19:35:25 +12:00
João Barbosa
95faffed26 qa: Check unconfirmed balance after loadwallet
Github-Pull: #15652
Rebased-From: 4bf1b1cefa9723bf2cfa8b1a938757abc99bb17b
2019-04-01 16:40:10 -04:00
John Newbery
a90db2f175 [tests] Add test for wallet rebroadcasts
The existing wallet_resendwallettransactions.py test only tests the
resendwallettransactions RPC. It does not test whether transactions are
actually rebroadcast, or whether the rebroadcast logic is called on a
timer.

This commit updates the test to not use the resendwallettransactions RPC and
test that transactions are rebroadcast on a timer.

Github-Pull: #15646
Rebased-From: 529c1ae4a04248a46a8b4a5a63ecbb12a63ff50e
2019-04-01 15:46:32 -04:00
fanquake
2edd0c40c3
rpc: return a number for estimated_feerate in analyzepsbt
Github-Pull: #15559
Rebased-From: 335931df4a37467299a2ee0ba521ecd5c4e6d39e
Tree-SHA512: ebe460e935e33fbbbe725db403654ee65c86a606401e8519e1180551e2ccd43661eb4ad20bf065f2c0c2a8026c3bb3bce796789f8d612e9e197ceb8d541a63a9
2019-03-13 12:20:05 +01:00
MarcoFalke
f9dbb319d2
Merge #15485: add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo
f13ad1cae0 modify test for memory locked in case locking pages failed at some point (Adam Jonas)
2fa85ebd1c add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo (Adam Jonas)

Pull request description:

  Creating the `rpc_misc.py` functional test file to add space for adding tests to a file that doesn't have a lot of coverage.
    - Removing the `getmemoryinfo()` smoke test from wallet basic rather than moving it to keep the wallet decoupled. Feel like testing for reasonable memory allocation values should suffice.
    - Adding coverage for `mallocinfo()`. Introduced standard lib XML parser since the function exports an XML string that describes the current state of the memory-allocation implementation in the caller.

Tree-SHA512: ced30115622916c88d1e729969ee331272ec9f2881eb36dee4bb7331bf633a6810a57fed63a0cfaf86de698edb5162e6a035efd07c89ece1df56b69d61288072
2019-03-01 13:54:20 -05:00
Adam Jonas
f13ad1cae0 modify test for memory locked in case locking pages failed at some point 2019-03-01 10:20:57 -05:00
MarcoFalke
a6d7026a45
Merge #15497: rpc: Consistent range arguments in scantxoutset/importmulti/deriveaddresses
ca253f6ebf Make deriveaddresses use stop/[start,stop] notation for ranges (Pieter Wuille)
1675b7ce55 Use stop/[start,stop] notation in importmulti desc range (Pieter Wuille)
4566011631 Add support for stop/[start,stop] ranges to scantxoutset (Pieter Wuille)
6b9f45e81b Support ranges arguments in RPC help (Pieter Wuille)
7aa6a8aefb Add ParseRange function to parse args of the form int/[int,int] (Pieter Wuille)

Pull request description:

  This introduces a consistent notation for RPC arguments in `scantxoutset`, `importmulti`, and `deriveaddresses`, either:
  * `"range" : int` to just specify the end of the range
  * `"range" : [int,int]` to specify both the begin and the end of the range.

  For `scantxoutset`, this is a backward compatible new feature. For the two other RPCs, it's an incompatible change, but neither of them has been in a release so far. Because of that non-released reason, this only makes sense in 0.18, in my opinion.

  I suggest this as an alternative to #15496, which only makes `deriveaddresses` compatible with `importmulti`, but not with the existing `scantxoutset` RPC. I also think `[int,int]` is more convenient than `{"start":int,"stop":int}`.

  I realize this is technically a feature added to `scantxoutset` after the feature freeze. If desired, I'll drop the `scantxoutset` changes.

Tree-SHA512: 1cbebb90cf34f106786dbcec7afbf3f43fb8b7e46cc7e6763faf1bc1babf12375a1b3c3cf86ee83c21ed2171d99b5a2f60331850bc613db25538c38b6a056676
2019-03-01 09:13:18 -05:00
Pieter Wuille
ca253f6ebf Make deriveaddresses use stop/[start,stop] notation for ranges 2019-02-28 21:40:09 -08:00
MarcoFalke
fa852f0e8d
test: Bump timeout on tests that timeout on windows 2019-02-28 18:35:09 -05:00
Pieter Wuille
1675b7ce55 Use stop/[start,stop] notation in importmulti desc range 2019-02-28 13:05:10 -08:00
Pieter Wuille
4566011631 Add support for stop/[start,stop] ranges to scantxoutset 2019-02-28 13:01:44 -08:00
Adam Jonas
2fa85ebd1c add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo 2019-02-26 15:08:36 -05:00
MarcoFalke
d88f7f8764
Merge #15471: rpc/gui: Remove 'Unknown block versions being mined' warning
ef362f2773 rpc/gui: Remove 'Unknown block versions being mined' warning (Wladimir J. van der Laan)

Pull request description:

  Due to miners inserting garbage into the version numbers causing false positives, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad).

  It preserves the warning in the logs. Whether this is desirable can be a point of discussion.

Tree-SHA512: 51407ccd24a571462465d9c7180f0f28307c50b82a03284abe783e181d8ab7e0638dbb710698d883f28de8a609db70763e39be2470d956e67c833da0768e43e9
2019-02-26 09:20:39 -05:00