diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-19 10:34:10 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-01-19 10:34:54 +0100 |
commit | 92dcbe9cc36926b20f08cb74562ae85b8932e341 (patch) | |
tree | 8a95b09daae328c31450f4af9f61447c1f3f4043 /doc | |
parent | 8ae2808a4354e8dcc697f76bacc5e2f2befe9220 (diff) | |
parent | d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d (diff) | |
download | bitcoin-92dcbe9cc36926b20f08cb74562ae85b8932e341.tar.xz |
Merge bitcoin/bitcoin#23395: util: Add -shutdownnotify option
d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d doc: Add release note for shutdownnotify. (klementtan)
0bd73e2c453e8a88312edf43d184c33109f12ad6 util: Add -shutdownnotify option. (klementtan)
Pull request description:
**Description**: Similar to `-startupnotify`, this PR adds a new option to allow users to specify a command to be executed when Bitcoin Core shuts down.
**Note**: The `shutdownnotify` commands will not be executed if bitcoind shut down due to *unexpected* reasons (ie `killall -9 bitcoind`).
### Testing:
**Normal shutdown commands**
```
# start bitcoind with shutdownnotify optioin
./src/bitcoind -signet -shutdownnotify="touch foo.txt"
# shutdown bitcoind
./src/bitcoin-cli -signet stop
# check that foo.txt has been created
```
**Final RPC call**
Commands:
```
$ ./src/bitcoind -signet -nolisten -noconnect -shutdownnotify="./src/bitcoin-cli -signet getblockchaininfo > tmp.txt"
$ ./src/bitcoin-cli stop
$ cat tmp.txt
```
<details>
<summary>Screen Shot</summary>
![image](https://user-images.githubusercontent.com/49265907/141186183-cbc6f82c-400d-4a8b-baba-27c0346c2c8a.png)
</details>
ACKs for top commit:
achow101:
ACK d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d
1440000bytes:
ACK https://github.com/bitcoin/bitcoin/pull/23395/commits/d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d
theStack:
re-ACK d96d97ad30c4a079450bc2bf02e3e2a45f7efd2d
Tree-SHA512: 16f7406fd232e8b97aea5e58854c84755b0c35c88cb3ef9ee123b29a1475a376122b1e100da860cc336d4d657e6046a70e915fdb9b70c9fd097c6eef1b028161
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release-notes-23395.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/release-notes-23395.md b/doc/release-notes-23395.md new file mode 100644 index 0000000000..b9d7d9409c --- /dev/null +++ b/doc/release-notes-23395.md @@ -0,0 +1,8 @@ +Notable changes +=============== + +New settings +------------ + +- The `shutdownnotify` option is used to specify a command to execute synchronously +before Bitcoin Core has begun its shutdown sequence. (#23395) |