mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 10:02:41 +02:00
Merge bitcoin/bitcoin#29345: rpc: Do not wait for headers inside loadtxoutset
faa30a4c56
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: ACKfaa30a4c56
theStack: Code-review ACKfaa30a4c56
pablomartin4btc: tACKfaa30a4c56
TheCharlatan: ACKfaa30a4c56
Tree-SHA512: 9167c7d8b2889bb3fd369de4acd2cc4d24a2fe225018d82bd9568ecd737093f6e19be7cc62815b574137b61076a6f773c29bff75398991b5cd702423aab2322b
This commit is contained in:
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user