Commit graph

186 commits

Author SHA1 Message Date
Glenn Willen
011feab4c4 Fix spelling lints.
For all spelling lints, either fix them in place, or add them to the
ignore list.

I don't understand how these have gotten in here without ever
triggering the linter until now. I'm not sure if it's something about
my test environment or what. But fixing them can't hurt.
2023-02-26 19:30:18 -08:00
Andrew Poelstra
25981aeceb Merge f66eceaecf into merged_master (Bitcoin PR bitcoin/bitcoin#22216) 2021-07-24 20:31:41 +00:00
Andrew Poelstra
5f0c45b568 Merge ac219dcbcc into merged_master (Bitcoin PR bitcoin/bitcoin#19160) 2021-07-01 13:29:36 +00:00
Andrew Poelstra
770892540f Merge 6664211be2 into merged_master (Bitcoin PR #21574) 2021-06-29 22:00:51 +00:00
Andrew Poelstra
d20af8f9ea Merge 602b038d43 into merged_master (Bitcoin PR #21366) 2021-06-29 00:32:18 +00:00
Andrew Poelstra
26fd4eb181 Merge a9d1b40d53 into merged_master (Bitcoin PR #21415) 2021-06-27 15:02:35 +00:00
Andrew Poelstra
7602228cf0 Merge 92cf3a22e3 into merged_master (Bitcoin PR #21007) 2021-06-26 19:51:03 +00:00
Andrew Poelstra
40b55f89b0 Merge 3f205808a5 into merged_master (Bitcoin PR #20605) 2021-06-14 18:26:20 +00:00
Andrew Poelstra
d228e06487 Merge f3e17686b3 into merged_master (Bitcoin PR #20468) 2021-06-11 16:13:19 +00:00
Russell Yanofsky
493fb47c57 Make SetupServerArgs callable without NodeContext
bitcoin-gui code needs to call SetupServerArgs but will not have a
NodeContext object if it is communicating with an external bitcoin-node
process.
2021-06-10 09:58:45 -05:00
Russell Yanofsky
ddf7ecc8df multiprocess: Add bitcoin-node process spawning support
Add bitcoin-node startup code to let it spawn and be spawned by other
processes
2021-04-23 03:02:50 -05:00
Russell Yanofsky
9044522ef7 Drop JSONRPCRequest constructors after #21366
This just makes an additional simplification after #21366 replaced
util::Ref with std::any. It was originally suggested
https://github.com/bitcoin/bitcoin/pull/21366#issuecomment-792044351 but
delayed for a followup. It would have prevented usage bug
https://github.com/bitcoin/bitcoin/pull/21572.
2021-04-07 04:53:26 -04:00
Sebastian Falbesoner
8dbb87a393 refactor: replace util::Ref by std::any (C++17) 2021-03-29 23:29:42 +02:00
fanquake
ebc4ab721b
refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
Wladimir J. van der Laan
e017a913d0 bitcoind: Add -daemonwait option to wait for initialization
This adds a `-daemonwait` flag that does the same as `-daemon` except
it, from a user perspective, backgrounds the process only after
initialization is complete.

This can be useful when the process launching bitcoind wants to
guarantee that either the RPC server is running, or that initialization
failed, before continuing. The exit code indicates the initialization
result.

This replaces the use of the libc function `daemon()` by a custom
implementation which is inspired by the glibc implementation, but also
creates a pipe from the child to the parent process for communication.

An additional advantage of having our own `daemon()` implementation is
that no MACOS-specific pragmas are needed anymore to silence a
deprecation warning.
2021-03-04 18:24:00 +01:00
Wladimir J. van der Laan
cd03513dc2 init: Signal-safe instant shutdown
Replace the 200ms polling loop with a faster and more efficient waiting
operation.

This was tried a few times before, but given up every time because
solutions use a condition variable which is not safe for use in signals
as they need to be reentrant.

On UNIX-ish OSes, use a safe way: a pipe. When shutdown is requested
write a dummy byte to the pipe. Waiting for shutdown is a matter of a
blocking read from the pipe.

On Windows, there are no signals so using a condition variable is safe.
2020-12-15 17:21:06 +01:00
Andrew Poelstra
c1f937fe53 Merge 8219893825 into merged_master (Bitcoin PR #19993) 2020-11-29 18:52:06 +00:00
Tyler Chambers
6690adba08
Warn when binaries are built from a dirty branch.
Adjusted version flag behavior in bitcoin-tx, bitcoin-wallet, and
bitcoind to match. Added functionality in gen-manpages.sh to warning when
attempting to generate man pages for binaries built from a dirty
branch.
2020-11-28 18:43:55 -05:00
Andrew Poelstra
4087c88a7e Merge 269a7ccb27 into merged_master (Bitcoin PR #19099) 2020-11-28 17:53:38 +00:00
Andrew Poelstra
ec3c13988a Merge 6a2ba62685 into merged_master (Bitcoin PR #19779) 2020-11-28 13:07:39 +00:00
Andrew Poelstra
e377f4f773 Merge f4cfa6d019 into merged_master (Bitcoin PR #15935) 2020-11-26 18:11:36 +00:00
Andrew Poelstra
c473bf0bce Merge bb588669f9 into merged_master (Bitcoin PR #19331) 2020-11-26 01:09:16 +00:00
Andrew Poelstra
51965ad1e6 Merge 25ad2c623a into merged_master (Bitcoin PR #18740) 2020-11-26 01:08:47 +00:00
Andrew Poelstra
1d1a32e637 Merge 5b24f6084e into merged_master (Bitcoin PR #16224) 2020-11-26 01:08:40 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
2016bea80a Merge 544709763e into merged_master (Bitcoin PR #18571)
This resulted in double-initializing the asset directory (and from multiple
places), so I added a `ClearGlobalAssetDir` method and called it from the
qt test setup.
2020-11-26 01:08:20 +00:00
Andrew Poelstra
e978e137dd Merge 4eb1eeb02c into merged_master (Bitcoin PR #18504) 2020-11-26 01:08:16 +00:00
Andrew Poelstra
cc668250eb Merge 97aadf98d0 into merged_master (Bitcoin PR #16117) 2020-11-26 01:07:50 +00:00
Andrew Poelstra
34af974d28 Merge 471e5f8829 into merged_master (Bitcoin PR #16839) 2020-11-09 21:20:47 +00:00
Andrew Poelstra
fdb06a8ceb Merge 4c1090c882 into merged_master (Bitcoin PR #17279) 2020-11-09 21:20:46 +00:00
Andrew Poelstra
821f5256a5 Merge 46d6930f8c into merged_master (Bitcoin PR #16659) 2020-11-09 21:20:41 +00:00
Andrew Poelstra
c7dea73134 Merge 4715037796 into merged_master (Bitcoin PR #17038) 2020-11-09 21:20:33 +00:00
Andrew Poelstra
52411627ed Merge 36604b4ef5 into merged_master (Bitcoin PR #16912) 2020-11-09 21:20:28 +00:00
Andrew Poelstra
5253addec0 Merge d8fe24cbfb into merged_master (Bitcoin PR #16489) 2020-11-09 21:20:23 +00:00
Andrew Poelstra
a191197ace Merge 83112db129 into merged_master (Bitcoin PR #15864) 2020-11-09 21:20:16 +00:00
Andrew Poelstra
524f35d7ef Merge 5c2885f9b2 into merged_master (Bitcoin PR #16481) 2020-11-09 21:20:09 +00:00
Andrew Poelstra
83019c2acd Merge d960d5ca99 into merged_master (Bitcoin PR #16362) 2020-11-09 21:20:08 +00:00
Andrew Poelstra
4619326139 Merge 67923d6b3c into merged_master (Bitcoin PR #16366) 2020-11-09 21:20:07 +00:00
Andrew Poelstra
e33ff205ee Merge 1a274bce4b into merged_master (Bitcoin PR #16205) 2020-11-06 15:20:15 +00:00
Andrew Poelstra
68d9951825 Merge d0f81a96d9 into merged_master (Bitcoin PR #16129) 2020-11-06 15:20:13 +00:00
Andrew Poelstra
44e5901b98 Merge 2c35fe6238 into merged_master (Bitcoin PR #15849) 2020-10-29 02:06:12 +00:00
MarcoFalke
faf0a26711
doc: Update comments for new chain settings (-signet and -chain=signet) 2020-09-22 22:32:25 +02:00
Russell Yanofsky
b266b3e0bf refactor: Create interfaces earlier during initialization
Add AppInitInterfaces function so wallet chain and chain client interfaces are
created earlier during initialization. This is needed in the next commit to
allow the gui splash screen to be able to register for wallet events through a
dedicated WalletClient interface instead managing wallets indirectly through
the Node interface. This only works if the wallet client interface is created
before the splash screen needs to use it.
2020-08-27 14:33:00 -04:00
MarcoFalke
fa9d5902f7
scripted-diff: gArgs -> args
-BEGIN VERIFY SCRIPT-
 # Replace gArgs with args
 sed -i 's/\<gArgs\>/args/g' src/init.cpp src/bitcoind.cpp
 sed -i 's/&args;/\&gArgs;/g' src/init.cpp

 # Format changed lines
 git diff -U0 | clang-format-diff -p1 -i -v
-END VERIFY SCRIPT-
2020-08-24 07:52:17 +02:00
MarcoFalke
fa40017706
init: Pass reference to ArgsManager around instead of relying on global 2020-08-24 07:45:17 +02:00
Russell Yanofsky
9c69cfe4c5 Add <datadir>/settings.json persistent settings storage.
Persistent settings are used in followup PRs #15936 to unify gui settings
between bitcoin-qt and bitcoind, and #15937 to add a load_on_startup flag to
the loadwallet RPC and maintain a dynamic list of wallets that should be loaded
on startup that also can be shared between bitcoind and bitcoin-qt.
2020-07-11 05:41:12 -04:00
MarcoFalke
cccc2784a3
scripted-diff: Move ui_interface to the node lib
-BEGIN VERIFY SCRIPT-

 # Move files
 git mv src/ui_interface.h                                          src/node/ui_interface.h
 git mv src/ui_interface.cpp                                        src/node/ui_interface.cpp
 sed -i -e 's/BITCOIN_UI_INTERFACE_H/BITCOIN_NODE_UI_INTERFACE_H/g' src/node/ui_interface.h

 # Adjust includes and makefile
 sed -i -e 's|ui_interface|node/ui_interface|g' $(git grep -l ui_interface)

 # Sort includes
 git diff -U0 | clang-format-diff -p1 -i -v

-END VERIFY SCRIPT-
2020-06-27 11:49:28 -04:00
Russell Yanofsky
6fca33b2ed refactor: Pass NodeContext to RPC and REST methods through util::Ref
This commit does not change behavior
2020-05-13 16:20:13 -04:00
Hennadii Stepanov
7e923d47ba
Make InitError bilingual 2020-05-05 04:46:04 +03:00
MarcoFalke
fa488f131f
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-04-16 13:33:09 -04:00