Commit graph

1411 commits

Author SHA1 Message Date
Andrew Poelstra
e5cb4cb00e Merge f13e03cda2 into merged_master (Bitcoin PR #20584) 2021-06-16 20:58:56 +00:00
Andrew Poelstra
0a58119253 Merge 68c7acf6bb into merged_master (Bitcoin PR #20671) 2021-06-15 16:40:45 +00:00
Andrew Poelstra
0d66f6cf42 Merge af4ce674da into merged_master (Bitcoin PR #20635) 2021-06-14 23:58:34 +00:00
Andrew Poelstra
939d8ee135 Merge ade38b6ee8 into merged_master (Bitcoin PR #20588)
o.O apparently the `tx_aux` argument to `createrawpegin` was literally unused
2021-06-14 02:19:09 +00:00
Andrew Poelstra
ee43c19115 Merge 736eb4d808 into merged_master (Bitcoin PR #19982) 2021-06-14 00:27:44 +00:00
Andrew Poelstra
a3b6f760ed Merge e98d1d6740 into merged_master (Bitcoin PR #19425) 2021-06-11 19:06:47 +00:00
Andrew Poelstra
2ec2763700 Merge 80d4231e16 into merged_master (Bitcoin PR #19980) 2021-06-10 21:23:06 +00:00
Andrew Poelstra
8d52d54329 Merge afdfd3c8c1 into merged_master (Bitcoin PR #20403) 2021-05-07 21:52:40 +00:00
Andrew Poelstra
14ff891036 Various ubsan fixes
Mostly harmless signed/unsigned conversions but also an actual
memory leak related to `BlindingData`.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
68bfd70b43 ci: various linter / CI compiler error fixes
Includes changing TRUE to OP_TRUE for anyone-can-spend output name,
to avoid symbol conflict on win64 builds, which is really obnoxious.
2021-03-26 17:33:04 +00:00
MarcoFalke
f13e03cda2
Merge #20584: Declare de facto const reference variables/member functions as const
31b136e580 Don't declare de facto const reference variables as non-const (practicalswift)
1c65c075ee Don't declare de facto const member functions as non-const (practicalswift)

Pull request description:

  _Meta: This is the second and final part of the `const` refactoring series (part one: #20581). **I promise: no more refactoring PRs from me in a while! :)** I'll now go back to focusing on fuzzing/hardening!_

  Changes in this PR:
  * Don't declare de facto const member functions as non-const
  * Don't declare de facto const reference variables as non-const

  Awards for finding candidates for the above changes go to:
  * `clang-tidy`'s [`readability-make-member-function-const`](https://clang.llvm.org/extra/clang-tidy/checks/readability-make-member-function-const.html)  check ([list of `clang-tidy` checks](https://clang.llvm.org/extra/clang-tidy/checks/list.html))
  * `cppcheck`'s `constVariable` check ([list of `cppcheck` checks](https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/))

  See #18920 for instructions on how to analyse Bitcoin Core using Clang Static Analysis, `clang-tidy` and `cppcheck`.

ACKs for top commit:
  ajtowns:
    ACK 31b136e580
  jonatack:
    ACK 31b136e580
  theStack:
    ACK 31b136e580 ❄️

Tree-SHA512: f58f8f00744219426874379e9f3e9331132b9b48e954d24f3a85cbb858fdcc98009ed42ef7e7b4619ae8af9fc240a6d8bfc1c438db2e97b0ecd722a80dcfeffe
2021-01-07 09:05:09 +01:00
MarcoFalke
fa4435e22f
Replace boost::optional with std::optional 2020-12-19 09:46:55 +01:00
MarcoFalke
fa7e803f3e
Remove unused MakeOptional
The only use was to work around a compiler warning in an ancient
compiler, which we no longer support.
2020-12-19 09:45:58 +01:00
Wladimir J. van der Laan
af4ce674da
Merge #20635: fix misleading comment about call to non-existing function
cc3044ccdb fix misleading comment about call to non-existing function (pox)

Pull request description:

  The comment seems to be describing the subsequent call to `SyncTransaction` but refers to it as `SyncNotifications`, which is not any function currently in the codebase.

  It's best to just remove the "what" aspect of the comment and focus on the "why", which also reduces the risk of similar documentation errors in the future, in case the function ever gets renamed, for example.

ACKs for top commit:
  laanwj:
    ACK cc3044ccdb

Tree-SHA512: 882ff17836ef585a603dc504f3dd21f56f682e49b28a0998f23fd16025826fbb083b7978db3ee70d0e0ff2c86fd6c3fd99a2361e5d45c765fdc5822c5f14c0a7
2020-12-17 15:06:01 +01:00
fanquake
ade38b6ee8
Merge #20588: Remove unused and confusing CTransaction constructor
fac39c1983 wallet: document that tx in CreateTransaction is purely an out-param (MarcoFalke)
faac31521b Remove unused and confusing CTransaction constructor (MarcoFalke)

Pull request description:

  The constructor is confusing and dangerous (as explained in the TODO), fix that by removing it.

ACKs for top commit:
  laanwj:
    Code review ACK fac39c1983
  promag:
    Code review ACK fac39c1983.
  theStack:
    Code review ACK fac39c1983

Tree-SHA512: e0c8cffce8d8ee0166b8e1cbfe85ed0657611e26e2af0d69fde70eceaa5d75cbde3eb489af0428fe4fc431360b4c791fb1cc21b8dee7d4c7a4f17df00836229d
2020-12-13 10:36:22 +08:00
pox
cc3044ccdb fix misleading comment about call to non-existing function 2020-12-12 07:01:38 +02:00
Hennadii Stepanov
e1e68b6305
test: Fix inconsistent lock order in wallet_tests/CreateWallet 2020-12-10 20:49:06 +02:00
MarcoFalke
fac39c1983
wallet: document that tx in CreateTransaction is purely an out-param 2020-12-07 15:02:55 +01:00
Russell Yanofsky
3fbbb9a640 refactor: Get rid of more redundant chain methods
This just drops three interfaces::Chain methods replacing them with other calls.

Motivation for removing these chain methods:

- Need to get rid of findFirstBlockWithTimeAndHeight for #10102, which doesn't
  support overloaded methods
- Followup from
  https://github.com/bitcoin/bitcoin/pull/16426#discussion_r412487403
- phantomcircuit comments about findNextBlock test
  http://www.erisian.com.au/bitcoin-core-dev/log-2020-06-06.html#l-214

Behavior is not changing in any way here. A TODO comment in
ScanForWalletTransactions was removed, but just because it was invalid (see
https://github.com/bitcoin/bitcoin/pull/19195#discussion_r448020762), not
because it was implemented.
2020-12-07 09:09:53 -04:00
practicalswift
31b136e580 Don't declare de facto const reference variables as non-const 2020-12-06 18:44:31 +00:00
practicalswift
1c65c075ee Don't declare de facto const member functions as non-const 2020-12-06 18:44:25 +00:00
Andrew Poelstra
5b89a9fc92 Merge 80e32e120e into merged_master (Bitcoin PR #20305) 2020-12-02 17:53:59 +00:00
Andrew Poelstra
94f7b7ba64 Merge c463f70fb0 into merged_master (Bitcoin PR #20139) 2020-12-02 16:13:18 +00:00
Andrew Poelstra
29c7f63764 Merge c48e788246 into merged_master (Bitcoin PR #18836) 2020-12-02 15:51:02 +00:00
Andrew Poelstra
ff7aedd1dd Merge 543693b92b into merged_master (Bitcoin PR #20378) 2020-12-02 14:34:42 +00:00
Andrew Poelstra
e198740eb1 Merge d9f5132736 into merged_master (Bitcoin PR #20344) 2020-12-02 07:51:12 +00:00
Andrew Poelstra
7ec1f12f7c Merge 1dfe19e284 into merged_master (Bitcoin PR #20153) 2020-12-02 06:52:54 +00:00
Andrew Poelstra
2d1adacaf2 Merge 663fd92b28 into merged_master (Bitcoin PR #20266) 2020-12-02 06:16:37 +00:00
fanquake
80d4231e16
Merge #19980: refactor: Some wallet cleanups
9b74461fa2 refactor: Assert before dereference in CWallet::GetDatabase (João Barbosa)
021feb3187 refactor: Drop redudant CWallet::GetDBHandle (João Barbosa)

Pull request description:

ACKs for top commit:
  achow101:
    Code Review ACK 9b74461fa2
  meshcollider:
    utACK 9b74461fa2
  ryanofsky:
    Code review ACK 9b74461fa2. Changes since last review: rebasing due to conflict, dropping wallet path commit c6a5cd7a64c78b162f545a3467d0fea7dcaadfcc as suggested in discussion, making GetDatabase() const in the earlier commit. Giving more descriptive title like

Tree-SHA512: 68cf3b5e9fe0acb3a5cd081086629989f213f1904cc344e5775767b56759a7d905b1e1c303afbe40f172ff81bf07f3719b59d8f6ec2de3fdd53cd0e2d220fb25
2020-12-02 08:23:00 +08:00
Andrew Poelstra
6a6ed8d6f1 Merge 26d7941224 into merged_master (Bitcoin PR #20230) 2020-12-01 21:22:22 +00:00
Andrew Poelstra
4eeadb7fde Merge 8ed37f6c84 into merged_master (Bitcoin PR #19077) 2020-11-30 20:20:56 +00:00
Andrew Poelstra
6a979f902a Merge 9efa55c715 into merged_master (Bitcoin PR #20130) 2020-11-30 18:50:04 +00:00
Andrew Poelstra
1b85209c18 Merge 1769828684 into merged_master (Bitcoin PR #19501)
Adds "verbose" flag to a bunch of RPC that pass through to SendMoney. I also
added it to sendtomainchain and destroyamount.
2020-11-30 02:17:54 +00:00
Andrew Poelstra
07d50b2951 Merge c95784e3d3 into merged_master (Bitcoin PR #20016) 2020-11-29 22:31:43 +00:00
Andrew Poelstra
7a8f77d7ad Merge 9e217f5a6f into merged_master (Bitcoin PR #19572) 2020-11-29 19:44:31 +00:00
Andrew Poelstra
9c308f094f Merge be375b2206 into merged_master (Bitcoin PR #19919) 2020-11-29 03:17:26 +00:00
Andrew Poelstra
239cea1d22 Merge 78cb45d722 into merged_master (Bitcoin PR #19738) 2020-11-29 00:26:50 +00:00
Andrew Poelstra
d4e8eb56b0 Merge 56d47e19ed into merged_master (Bitcoin PR #19619) 2020-11-29 00:21:17 +00:00
Andrew Poelstra
646aa14168 Merge a0a422c34c into merged_master (Bitcoin PR #19754) 2020-11-28 22:31:57 +00:00
Andrew Poelstra
afe472121a Merge a1d14f522c into merged_master (Bitcoin PR #19671) 2020-11-28 19:48:53 +00:00
Andrew Poelstra
5f6eb8ee3f Merge f98872f127 into merged_master (Bitcoin PR #18244) 2020-11-28 18:55:44 +00:00
Andrew Poelstra
a6e69db203 Merge 7721b31809 into merged_master (Bitcoin PR #19773) 2020-11-28 18:22:47 +00:00
Andrew Poelstra
4087c88a7e Merge 269a7ccb27 into merged_master (Bitcoin PR #19099) 2020-11-28 17:53:38 +00:00
Andrew Poelstra
2217632a3e Merge 21eda43cde into merged_master (Bitcoin PR #19828) 2020-11-28 17:02:25 +00:00
Andrew Poelstra
de97906fad Merge 91af7ef831 into merged_master (Bitcoin PR #19289) 2020-11-28 14:31:34 +00:00
Andrew Poelstra
ddd9b819bb Merge a2a250c7d0 into merged_master (Bitcoin PR #19743) 2020-11-28 00:53:18 +00:00
Andrew Poelstra
f197c02e18 Merge c831e105c5 into merged_master (Bitcoin PR #14582) 2020-11-27 23:36:05 +00:00
Andrew Poelstra
229e81e10c Merge f269165edc into merged_master (Bitcoin PR #17458) 2020-11-27 20:32:05 +00:00
Andrew Poelstra
f3a6693ff5 Merge c0b1706964 into merged_master (Bitcoin PR #19568)
Reduction in duplicated code -and- in Elements/Bitcoin diff :)
2020-11-27 18:54:38 +00:00
Andrew Poelstra
7297f932a0 Merge 9d4b3d86b6 into merged_master (Bitcoin PR #19334) 2020-11-26 17:07:31 +00:00