diff options
author | fanquake <fanquake@gmail.com> | 2024-02-26 10:56:45 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2024-02-26 11:11:25 +0000 |
commit | ba90b058bd9003d6286d22f88f26c35ec877b87d (patch) | |
tree | d1edb51858aa5ad97e655cefcb272da8e012792c /contrib | |
parent | d0a9e339a9df4c6a7ab932e0409ce96263aeef95 (diff) | |
parent | faa30a4c566c5b720c7994c55f276352a119129f (diff) | |
download | bitcoin-ba90b058bd9003d6286d22f88f26c35ec877b87d.tar.xz |
Merge bitcoin/bitcoin#29345: rpc: Do not wait for headers inside loadtxoutset
faa30a4c566c5b720c7994c55f276352a119129f rpc: Do not wait for headers inside loadtxoutset (MarcoFalke)
Pull request description:
While the `loadtxoutset` default 10 minute timeout is convenient when it is sufficient, it may cause hassle where it is not. For example:
* When P2P connections are missing, it seems better to abort early than wait for the timeout.
* When the 10 minute timeout is not sufficient, the RPC will have to be called again, so a check or loop is needed outside the RPC either way. So might as well remove the loop inside the RPC.
ACKs for top commit:
fjahr:
ACK faa30a4c56
theStack:
Code-review ACK faa30a4c566c5b720c7994c55f276352a119129f
pablomartin4btc:
tACK faa30a4c566c5b720c7994c55f276352a119129f
TheCharlatan:
ACK faa30a4c566c5b720c7994c55f276352a119129f
Tree-SHA512: 9167c7d8b2889bb3fd369de4acd2cc4d24a2fe225018d82bd9568ecd737093f6e19be7cc62815b574137b61076a6f773c29bff75398991b5cd702423aab2322b
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/devtools/test_utxo_snapshots.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/devtools/test_utxo_snapshots.sh b/contrib/devtools/test_utxo_snapshots.sh index 93a4cd1683..d7c019f4a6 100755 --- a/contrib/devtools/test_utxo_snapshots.sh +++ b/contrib/devtools/test_utxo_snapshots.sh @@ -183,8 +183,8 @@ echo "-- Initial state of the client:" client_rpc getchainstates echo -echo "-- Loading UTXO snapshot into client..." -client_rpc loadtxoutset "$UTXO_DAT_FILE" +echo "-- Loading UTXO snapshot into client. Calling RPC in a loop..." +while ! client_rpc loadtxoutset "$UTXO_DAT_FILE" ; do sleep 10; done watch -n 0.3 "( tail -n 14 $CLIENT_DATADIR/debug.log ; echo ; ./src/bitcoin-cli -rpcport=$CLIENT_RPC_PORT -datadir=$CLIENT_DATADIR getchainstates) | cat" |