Commit Graph

1269 Commits

Author SHA1 Message Date
PastaPastaPasta
cbbe801a3c
Merge pull request #4675 from Munkybooty/backports-0.18-pr20
Backports 0.18 pr20
2022-03-11 14:01:41 -06:00
gabriel-bjg
52ddf5c453
Compressed headers implementation. (#4497)
* Compressed headers implementation.

First header is always compressed in a headers2 msg
Version is uncompressed if it’s not matched within the last 7 unique versions to be sent in the current msg
Service flag to signal that the peer supports compressed headers
If compressed headers services is active, the peer will receive headers compressed
If both sendheaders and sendheaders2 are sent, the peer will respond with compressed headers
Functional tests as for uncompressed headers
Updates regarding the existing functional tests to use the compressed headers if the NODE_HEADERS_COMPRESSED service flag is active

* style: add missing comma

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-03-11 22:39:12 +03:00
UdjinM6
ab8ef174d5 fix 13381/15108 - no embedded 2022-03-08 22:53:13 -05:00
MarcoFalke
91a886770b Merge #15108: [tests] tidy up wallet_importmulti.py
2d5f1ea2e3 [tests] move wallet util functions to wallet_util.py (John Newbery)
6be64ef02c [tests] tidy up wallet_importmulti.py (John Newbery)

Pull request description:

  Cherry picks un-merged commits from #14952, which "fixes review comments from @ryanofsky here: https://github.com/bitcoin/bitcoin/pull/14886#pullrequestreview-183772779"

Tree-SHA512: 5f389196b0140d013a533d500f1812786a3a5cfb65980e13eaeacc459fddb55f43d05da3ab5e7cc8c997f26c0b667eed081ab6de2d125e631c70a7dd4c06e350
2022-03-08 22:53:13 -05:00
Wladimir J. van der Laan
67c41a3aee Merge #15059: test: Add basic test for BIP34
fab17e8272f5f70213f186809479ee7a75898b1d test: Add basic test for BIP34 (MarcoFalke)

Pull request description:

  BIP34 was disabled for testing, which explains why it had no test.

  Fix that by enabling it and adding a test.

Tree-SHA512: 9cb5702d474117ce6420226eb93ee09d6fb5fc856fabc8b67abe56a088cd727674e0e5462000e1afa83b911374036f90abdbdde56a8c236a75572ed47e10a00f
2022-03-08 22:53:13 -05:00
Wladimir J. van der Laan
5d6e2565e6 Merge #15057: [rpc] Correct reconsiderblock help text, add test
fa38d3df69851212fea7544badadc1c3e5369bf5 [rpc] Correct reconsiderblock help text, add test (MarcoFalke)

Pull request description:

  Rework documentation and test to match the implementation

Tree-SHA512: d0adef6b054a341bcc1cb87783a4e4cf9be124ba6812e1ac88246a5e01b2861a8071b12dba880b2b428c37da3fa860bfec3fe3e5fbb7c28696872113faa84a9f
2022-03-08 22:53:13 -05:00
Jonas Schnelli
cabaeaa2fc Merge #13381: RPC: creates possibility to preserve labels on importprivkey
a6b5ec18f rpc: creates possibility to preserve labels on importprivkey (marcoagner)

Pull request description:

  Closes #13087.

  As discussed in the issue, this is a feature request instead of a bug report since the behaviour was as intended (i.e. label with default: `''`). With this, the old behaviour is kept while the possibility to achieve the preservation of labels, as expected in the open issue, is added.

Tree-SHA512: b33be50e1e7f62f7ddfae953177ba0926e2d848961f9fac7501c2b513322c0cb95787745d07d137488267bad1104ecfdbe800c6747f94162eb07c976835c1386
2022-03-08 00:46:09 -05:00
UdjinM6
ac654efa60
Merge pull request #4709 from PastaPastaPasta/develop-trivial-2022-02-26
backport: trivial backports Feb 26 2022
2022-03-08 02:54:23 +03:00
MarcoFalke
0485b3a187 Merge #17071: tests: Add fuzzing harness for CheckBlock(...) and other CBlock related functions
893aa207e84b74e7623243967d29f03570fdfd6f tests: Add fuzzing harness for CheckBlock(...) and other CBlock related functions (practicalswift)
ec8dcb0199c6d6ae47a13abbd158f59532554adb tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)

Pull request description:

  Add fuzzing harness for `CheckBlock(...)` and other `CBlock` related functions.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/block
  …
  # And to to quickly verify that the relevant code regions are triggered, that the
  # fuzzing throughput seems reasonable, etc.
  $ contrib/devtools/test_fuzzing_harnesses.sh '^block$'
  ```

  `test_fuzzing_harnesses.sh` can be found in PR #17000.

Top commit has no ACKs.

Tree-SHA512: 275abd46d8ac970b28d8176f59124988b1e07c070173e001acd55995b830333417f301c309199fc589da08a6ac4c03aa74650d5e1638f6e3023dfbd3c9f6921d
2022-03-07 09:40:31 -06:00
MarcoFalke
0e7b64575c Merge #17109: tests: Add fuzzing harness for various functions consuming only integrals
597d10ceb9fd2a118c7e551cd6263379691d9295 tests: Add fuzzing harness for various functions consuming only integrals (practicalswift)
575383b3e1361e60ba88738a34d92b1662f915a7 tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)

Pull request description:

  Add fuzzing harness for various functions consuming only integrals.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/integer
  ```

Top commit has no ACKs.

Tree-SHA512: f0ccbd63671636f8e661385b682e16ad287fef8f92e7f91327ee2093afc36fcd424e1646fe90279388e28a760bcc795766eb80cf6375e0f873efff37fc7e2393
2022-03-07 09:40:31 -06:00
MarcoFalke
1e2ac59112 Merge #17522: test: Wait until mempool is loaded in wallet_abandonconflict
dddd09eb33d14fabda0aa40fa008b23b2bd6e589 test: Wait until mempool is loaded in wallet_abandonconflict (MarcoFalke)

Pull request description:

  This might or might not fix intermittent issues such as https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/28724018#L4091

  I believe the mempool was not loaded fully after the restart, in which case it was not dumped either on the next restart. Thus, the previous mempool was attempted to be loaded a second time, which succeeded and contained the txs.

ACKs for top commit:
  laanwj:
    ACK dddd09eb33d14fabda0aa40fa008b23b2bd6e589

Tree-SHA512: ab7061f946b5e5388f825dddceadb125f5197b24af3a7fcf1e700235d106a323419a56bfb4d84a2e27442e0de63e540c623b704343d83a98deaab3c02fcbdcbe
2022-03-07 09:36:17 -06:00
UdjinM6
1f9e178d3d
Merge pull request #4714 from kittywhiskers/db_refactor
merge bitcoin#19290...19308: berkeley db refactoring
2022-03-06 21:29:31 +03:00
Kittywhiskers Van Gogh
a40b94755a merge bitcoin#19324: Move BerkeleyBatch static functions to BerkeleyDatabase 2022-03-06 12:30:58 +05:30
Kittywhiskers Van Gogh
07a4d48249 merge bitcoin#18918: Move salvagewallet into wallettool 2022-03-06 12:30:20 +05:30
PastaPastaPasta
c67867582d
Merge pull request #4638 from Munkybooty/backports-0.18-pr18
Backports 0.18 pr18
2022-03-05 12:43:14 -06:00
PastaPastaPasta
47ad9ab146
Merge pull request #4706 from kittywhiskers/libnatpmp
merge bitcoin#18077...22397: Add NAT-PMP port forwarding support
2022-03-05 11:03:44 -06:00
MeshCollider
80bbd4242d Merge #14075: Import watch only pubkeys to the keypool if private keys are disabled
f4b00b70e Import public keys in order (Andrew Chow)
9e1551b9c Test pubkey import to keypool (Andrew Chow)
513719c5f Add option to importmulti add an imported pubkey to the keypool (Andrew Chow)
9b81fd19a Fetch keys from keypool when private keys are disabled (Andrew Chow)
99cccb900 Add a method to add a pubkey to the keypool (Andrew Chow)

Pull request description:

  If the wallet has private keys disabled, allow importing public keys into the keypool. A `keypool` option has been added to `importmulti` in order to signal that the keys should be added to the keypool.

Tree-SHA512: e88ea7bf726c13031aa739389a0c2662e6b22a4f9a4dc45b042418c692a950d98f170e0db80eb59e9c9063cda8765eaa85b2927d1790b9625744f7a87bad5fc8
2022-03-04 23:38:32 -05:00
Odysseas Gabrielides
64f7a1e291
Revert "feat: introduce devnetVersion for devnet breaking changes; always use DGW on devnets (#4685)" (#4712)
This reverts commit a3b4aab936.
2022-02-28 10:43:00 -06:00
MarcoFalke
525c12e60f Merge #15383: [rpc] mining: Omit uninitialized currentblockweight, currentblocktx
fa178a6385 [rpc] mining: Omit uninitialized currentblockweight, currentblocktx (MarcoFalke)

Pull request description:

  Previously we'd report "0", which could be mistaken for a valid number. E.g. the number of transactions is 0 or the block weight is 0, whatever that means.

Tree-SHA512: ee94ab203a329e272211b726f4c23edec4b09c650ec363b77fd59ad9264165d73064f78ebb9e11b5c2c543b73c157752410a307655560531c7d5444d203aa0ea
2022-02-27 13:33:36 -05:00
MarcoFalke
3834c10098 Merge #15415: [test] functional: allow custom cwd, use tmpdir as default
e3e1a5631e [test] functional: set cwd of nodes to tmpdir (Sjors Provoost)

Pull request description:

  Any process launched by bitcoind will have `self.datadir` as its `cwd`.

Tree-SHA512: 0b311643bb96c7dc2f693774620173243b3add40bf373284695af2f0071823b23485289fd2ffe152b7f63e0bfe989b16720077cfc2ce33905f9b8e7f2630f3c0
2022-02-27 13:33:26 -05:00
PastaPastaPasta
e8b8568d9e
Merge pull request #4702 from kittywhiskers/bench2
merge bitcoin#16540...#17542: benchmarks (part 2)
2022-02-26 13:09:31 -06:00
Kittywhiskers Van Gogh
7d989179f9
refactor(evo): introduce IsTriviallyValid() to CheckPro*Tx objects (#4696)
* evo: introduce IsTriviallyValid() to CheckPro*Tx objects

* evo: relocate Check* and CheckPro*Tx logic to deterministicmns (move-only)

* evo: relocate masternode state and chainlock sig logic to dedicated files (move-only)

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

* evo: issue penalty for CheckInputsHash failure when validating ProUp*Tx

Co-authored-by: PastaPastaPasta <PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-02-26 12:50:35 -06:00
Kittywhiskers Van Gogh
687c7d4a5d merge bitcoin#18077: Add NAT-PMP port forwarding support 2022-02-26 17:49:13 +05:30
Kittywhiskers Van Gogh
831b0057d9 merge bitcoin#17009: Add EvalScript(...) fuzzing harness 2022-02-26 10:45:13 +05:30
MeshCollider
ed0e2dd075
Merge #14021: Import key origin data through descriptors in importmulti (+ changes from PRs partially merged earlier: 15368, 15749)
cb3511b9d Add release notes for importing key origin info change (Andrew Chow)
4c75a69f3 Test importing descriptors with key origin information (Andrew Chow)
02d6586d7 Import KeyOriginData when importing descriptors (Andrew Chow)
3d235dff5 Implement a function to add KeyOriginInfo to a wallet (Andrew Chow)
eab63bc26 Store key origin info in key metadata (Andrew Chow)
345bff601 Remove hdmasterkeyid (Andrew Chow)
bac8c676a Add a method to CWallet to write just CKeyMetadata (Andrew Chow)
e7652d3f6 Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} (Andrew Chow)
c45415f73 Refactor keymetadata writing to a separate method (Andrew Chow)

Pull request description:

  This PR allows for key origin data as defined by the descriptors document to be imported to the wallet when importing a descriptor using `importmulti`. This allows the `walletprocesspsbt` to include the BIP 32 derivation paths for keys that it is watching that are from a different HD wallet.

  In order to make this easier to use, a new field `hdmasterkeyfingerprint` has been added to `getaddressinfo`. Additionally I have removed `hdmasterkeyid` as was planned. I think that this API change is fine since it was going to be removed in 0.18 anyways. `CKeyMetadata` has also been extended to store key origin info to facilitate this.

Tree-SHA512: 9c7794f3c793da57e23c5abbdc3d58779ee9dea3d53168bb86c0643a4ad5a11a446264961e2f772f35eea645048cb60954ed58050002caee4e43cd9f51215097
2022-02-18 03:42:05 +03:00
PastaPastaPasta
9789a42088
Merge pull request #4575 from Munkybooty/backports-0.19-pr7
Backports 0.19 pr7
2022-02-15 23:31:21 +07:00
PastaPastaPasta
a3b4aab936
feat: introduce devnetVersion for devnet breaking changes; always use DGW on devnets (#4685)
* feat: introduce devnetVersion as a method for breaking changes to devnets

include devnetVersion in expected version for devnet connections

* feat: always use DGW on devnets

* fix p2p_connect_to_devnet.py

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-02-13 11:44:49 +03:00
thephez
dcc00ac8e9
test: skip test properly if zmq missing (#4684) 2022-02-12 04:33:46 +07:00
UdjinM6
359b5f3dff Do not reset validity flags for -checklevels below 3, fix wallet_balance.py 2022-01-30 18:31:00 -05:00
MarcoFalke
1c908fbd49 Merge #16079: wallet_balance.py: Prevent edge cases
bb41e632ca wallet_balance.py: Prevent edge cases (Steven Roose)

Pull request description:

  I ran into this edge case when running the test on Elements. I had a 0-value output as change.

ACKs for commit bb41e6:

Tree-SHA512: ef4c25289cafcdb4437f11ed537664dff5afedcefab75a46f985d3be70551de2d3bc8e9cfcb22c0f3d7d2eb95ff40df78b8d01dbacbf90c36bca00426937b0a2
2022-01-30 18:31:00 -05:00
MarcoFalke
c39bbf8d39 Merge #15758: qa: Add further tests to wallet_balance
fa79a783d6 test: Add reorg test to wallet_balance (MarcoFalke)
fad03cd046 test: Check that wallet txs not in the mempool are untrusted (MarcoFalke)
fa195315e6 test: Add getunconfirmedbalance test with conflicts (MarcoFalke)
fa464e8211 test: Add wallet_balance test for watchonly (MarcoFalke)

Pull request description:

  Second commit can be reviewed with `--ignore-all-space`

ACKs for commit fa79a7:
  jnewbery:
    utACK fa79a783d63060dc6a8521c1de58b158979a59e9

Tree-SHA512: ec4919a3c93b6dcb35d58e7c65bdffe7f4c8cb87b9287f3679631c1823ef5bd72789f233def94e60c1ab332711601751645566f5997ce250af55b328ed60e917
2022-01-30 18:31:00 -05:00
Wladimir J. van der Laan
c516869bcf Merge #16322: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
0d101a340c44841cbbc5982d55354b1787bc39e2 test: Add test for maxtxfee option (MarcoFalke)
177550101b600ccb32886695326eb72cd9752c8b wallet: Remove unreachable code in CreateTransaction (MarcoFalke)
5c1b9714cb0a13be28324f91f4ec9ca66a1de8c7 wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction (João Barbosa)

Pull request description:

  Follow up to #16257, this PR makes `bumpfee` aware of `-maxtxfee`.

  It also prevents dangling locked unspents when calling `fundrawtransaction` - because the previous check was after `LockCoin`.

ACKs for top commit:
  MarcoFalke:
    re-ACK 0d101a340c44841cbbc5982d55354b1787bc39e2, only change is small test fixup

Tree-SHA512: 3464b24ae7cd4e72ed41438c6661828ba1304af020f05da62720b23668ae734e16cf47c6d97e150cc84ef631ee099b16fc786c858f3d089905845437338fd512
2022-01-30 18:31:00 -05:00
UdjinM6
79f881b141 Do not create non-standard txes in feature_addressindex.py 2022-01-30 18:31:00 -05:00
MarcoFalke
8ca90f3f99 Merge #15891: test: Require standard txs in regtest by default
fa89badf887dcc01e5bdece248b5e7d234fee227 test: Require standard txs in regtest (MarcoFalke)
fa9b4191609c3ef75e69d391eb91e4d5c1e0bcf5 test: Add test that mainnet requires standard txs (MarcoFalke)
fa613ca0a8f99c4771859de9e571878530d3ecb5 chainparams: Remove unused fMineBlocksOnDemand (MarcoFalke)

Pull request description:

  I don't see a reason why regtest should allow non-standard txs, as it makes testing mainnet behaviour such as #15846 unnecessarily hard and unintuitive.

  Of course, testnet policy remains unchanged to allow propagation of non-standard txs.

ACKs for top commit:
  ajtowns:
    ACK fa89badf887dcc01e5bdece248b5e7d234fee227

Tree-SHA512: c4c675affb054868850bd2683aa07f4c741a448cbacb2ea8334191e105f426b0790fe6a468be61e9c5880d24154f7bf1c7075051697172dce92180c1bc3a1c90
2022-01-30 18:31:00 -05:00
Wladimir J. van der Laan
41f9bfaee6 Merge #11882: Disable default fallbackfee on mainnet
3f592b8 [QA] add wallet-rbf test (Jonas Schnelli)
8222e05 Disable wallet fallbackfee by default on mainnet (Jonas Schnelli)

Pull request description:

  Removes the default fallback fee on mainnet (but keeps it on testnet/regtest).

  Transactions using the fallbackfee in case the fallback fee has not been set are getting rejected.

Tree-SHA512: e54d2594b7f954e640cc513a18b0bfbe189f15e15bdeed4fe02b7677f939bca1731fef781b073127ffd4ce08a595fb118259b8826cdaa077ff7d5ae9495810db
2022-01-30 18:30:28 -05:00
MarcoFalke
356785cdaa Merge #16293: test: Make test cases separate functions
faf8318c55a6001270a6fc8ed2298767099bafba test: Split fundrawtx test into subtests (MarcoFalke)
fa6fba3bc8013d7f813edd71f152d86eab907e4d test: Make local symbols in run_test members (MarcoFalke)

Pull request description:

  This prevents scope-leak of symbols that are supposed to be local to one test case.

Top commit has no ACKs.

Tree-SHA512: 9b2a4ca2cdd631ef915d2f7e6cd62375df9a0919448350aa6e5ae4aa8a8fe3ba53870f7a9a25a57736894b4e3a45e861018253ed2d57d9a64c2bb65fa270fad8
2022-01-30 18:29:41 -05:00
UdjinM6
0ed9f56a9b
Merge pull request #4612 from Munkybooty/backports-0.19-pr9
Backports 0.19 pr9
2022-01-24 18:26:59 +03:00
PastaPastaPasta
8ef0231166
refactor: break circular dependencies(-16, +2) (#4670)
* refactor: break circular dependencies(-13, +2)

introduces specialtxman, which handles validation of special transactions, specialtx is now simply the primitive underlying type. This breaks a lot of the circular depends

Also removes an unneeded `#include <masternode/payments.h>` in net_processing.cpp, which resolves a circular dependency. (we know it's okay to remove b/c masternode/payments.h isn't included in any header files, and removing it doesn't break compilation)

* format: make clang-format happy

* remove unrelated change

* remove some unneeded includes to `evo/deterministicmns.h`, explicitly include some previously implicitly included includes.

Resolves two circular dependencies

* refactor: remove circular depend, unused include
2022-01-24 17:20:50 +03:00
fanquake
042207fa33 Merge #16885: doc: Update tx-size-small comment with relevant CVE disclosure
c4b0c08f7c91bcef48dd023982ff132795575247 Update tx-size-small comment with relevant CVE disclosure (Gregory Sanders)

Pull request description:

  Code first introduced under https://github.com/bitcoin/bitcoin/pull/11423 with essentially no description and no discussion.

ACKs for top commit:
  MarcoFalke:
    ACK c4b0c08f7c91bcef48dd023982ff132795575247
  fanquake:
    ACK c4b0c08f7c91bcef48dd023982ff132795575247

Tree-SHA512: 95d5c92998b8b1e944c477dbaee265b62612b6e815099ab31d9ff580b4dff777abaf7f326a284644709f918aa1510412d62310689b1250ef6e64de7b19ca9f71
2022-01-20 13:09:37 -05:00
Wladimir J. van der Laan
c0d211a356 Merge #14457: test: add invalid tx templates for use in functional tests
59e387705c7e55ec40400301346354fa2d0c613f test: add invalid tx templates for use in functional tests (James O'Beirne)

Pull request description:

  This change adds a list of `CTransaction`-generating templates which each correspond to a specific type of invalid transaction. We then use this list to test for a wider variety of invalid tx types in `p2p_invalid_tx.py` and `feature_block.py`.

  Consolidating all invalid tx types will allow us to more easily cover all tx reject cases from a variety of tests without repeating ourselves. Validation logic doesn't differ much between mempool and block acceptance, but there *is* a difference and we should be sure we're testing both comprehensively.

  Right now, I've only added templates covering the tx reject types listed below but if this approach seems worthwhile I will expand the list to be fully comprehensive.
  ```
  bad-txns-in-belowout
  bad-txns-inputs-duplicate
  bad-txns-too-many-sigops
  bad-txns-vin-empty
  bad-txns-vout-empty
  bad-txns-vout-negative
  ```

Tree-SHA512: 05407f4a953fbd7c44c08bb49bb989cefd39a2b05ea00f5b3c92197a3f05e1b302f789e33832445734220e1c333d133aba385740b77b84139b170c583471ce20
2022-01-20 13:09:17 -05:00
MarcoFalke
11eacbe855 Merge #16845: test: Add notes on how to generate data/wallets/high_minversion
2222c96deec0f636dee6e49efb745f29b06a40a5 test: Add notes on how to generate data/wallets/high_minversion (MarcoFalke)

Pull request description:

  I forgot to do this in #16796

ACKs for top commit:
  ryanofsky:
    ACK 2222c96deec0f636dee6e49efb745f29b06a40a5

Tree-SHA512: 5f24ffa641b97eac4febad42ade7228b14fa72335c918a10880c5dec86a3ecc3075a31526f275188e07fea95b8e2c6320c64f716099f604b00e13d5366fcee37
2022-01-20 13:09:17 -05:00
gabriel-bjg
f73fce7782
ci: Enable tsan on linux64 build (#4563)
Make fMixing atomic as it has concurrent access
Add tsan suppression for zmq namespace
Suppress deadlock false positive in ConnectTip
Switch ubsan target to linux32
Add new test job for linux64_cxx17 target without any sanitizers
Increase rpc time out for block reward reallocation test
Fix heap use after free in CConnman::GetExtraOutboundCount()
Different builds for linux32 and linux64 tsan and ubsan
Increase timeout for llmq_signing functional test
2022-01-10 11:31:45 -06:00
PastaPastaPasta
25f5be7da7
Merge pull request #4643 from dzutte-cpp/merge_14890_15390
Merge bitcoin#14890 and bitcoin#15390
2022-01-09 21:03:01 -05:00
UdjinM6
e706b59fb9
Merge pull request #4613 from vijaydasmp/bp197
merge Bitcoin #16325 #16210 #15784 #15757 : Backport
2022-01-04 18:18:22 +03:00
Vijay Manikpuri
3148450032
Merge #16129: refactor: Remove unused includes (#4623)
67f4e9c522 Include core_io.h from core_read.cpp (practicalswift)
eca9767673 Make reasoning about dependencies easier by not including unused dependencies (practicalswift)

Pull request description:

  Make reasoning about dependencies easier by not including unused dependencies.

  Please note that the removed headers are _not_ "transitively included" by other still included headers. Thus the removals are real.

  As an added bonus this change means less work for the preprocessor/compiler. At least 51 393 lines of code no longer needs to be processed:

  ```
  $ git diff -u HEAD~1 | grep -E '^\-#include ' | cut -f2 -d"<" | cut -f1 -d">" | \
        sed 's%^%src/%g' | xargs cat | wc -l
  51393
  ```

  Note that 51 393 is the lower bound: the real number is likely much higher when taking into account transitively included headers :-)

ACKs for commit 67f4e9:

Tree-SHA512: 0c8868aac59813f099ce53d5307eed7962dd6f2ff3546768ef9e5c4508b87f8210f1a22c7e826c3c06bebbf28bdbfcf1628ed354c2d0fdb9a31a42cefb8fdf13

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2022-01-03 13:10:02 -06:00
Wladimir J. van der Laan
036c9537ca
partial Merge #16325: rpc: Clarify that block count means height excl genesis
fab0c820fa4c0c3227eec85c64310a3bf938a149 rpc: Clarify that block count means height excl genesis (MarcoFalke)

Pull request description:

  There is a common misconception that the block count returned by the blockchain rpcs includes the genesis block. See for example the discussion in https://github.com/bitcoin/bitcoin/pull/16292#issuecomment-506303256.

  However, it really returns the height, which is `0` for the genesis block.

  So clarify that and also remove the misleading "longest blockchain" comment.

  Finally, fix the wallet test that incorrectly used this rpc.

ACKs for top commit:
  instagibbs:
    utACK fab0c820fa
  promag:
    ACK fab0c82, sorry for the misconception.

Tree-SHA512: 0d087cbb628d3866352bca6420402f392e6a997e579941701a408a7fca355d84645045661f39b022e4479cc07f85a6cddaa9095b6fd9911b245692482420a5e4
2022-01-03 18:55:39 +05:30
UdjinM6
db312c361e
Revert "Merge #16404: qa: Test ZMQ notification after chain reorg" (#4646)
This reverts commit cf43f40fb4.
2022-01-03 15:30:11 +03:00
Wladimir J. van der Laan
67857bce60 Merge #14890: rpc: Avoid creating non-standard raw transactions
fa4c8679ed94f215ce895938f7c3c169a2ce101e rpc: Avoid creating non-standard raw transactions (MarcoFalke)

Pull request description:

  Multiple OP_RETURN outputs in a transaction are not standard and unlikely to be relayed, so avoid creating them.

  Apart from that, the logic was broken in that it duplicated the same hex-data for each data output: Closes #14868.

Tree-SHA512: b08d08062b5622e8a7b497e490ccaf53b06e844c863fda3bf3f932a98684a809e8341aeb98232059a795afb32d8770a6c5591a66f8e6ee372b672af245607887
2021-12-30 12:41:27 -08:00
PastaPastaPasta
06998263bb
Optimize linters (#4637)
* optimize: somehow optimize circular-dependencies.py

Signed-off-by: pasta <pasta@dashboost.org>

* optimize: use parallel if available to lint in parallel

Signed-off-by: pasta <pasta@dashboost.org>

* suggestions

* more suggestions

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-12-30 19:34:36 +03:00
PastaPastaPasta
19149f50f4
Merge pull request #4632 from Munkybooty/backports-0.19-pr11
Backports 0.19 pr11
2021-12-29 14:32:26 -05:00