test accounting_addresses: stop alice before requesting, because we need a new session.
What changed, and why it matters
This is a minor change to a test script for the Electrum Bitcoin wallet. It stops a test wallet daemon before running a command and adds a flag to use a new session. There is no security issue here—it's purely a test reliability fix.
No security action needed. This is a test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies tests/regtest/regtest.sh in the swapserver_forceclose test case. Before checking alice’s onchain_history, the script now calls $alice stop and invokes $alice -o onchain_history. The -o flag creates a new one-off session, which is needed because the daemon was stopped. This is a follow-up to a prior commit and only affects regtest integration tests.
Changed components
tests/regtest/regtest.shInspect captured patch +2 / −1
diff --git a/tests/regtest/regtest.sh b/tests/regtest/regtest.sh
index 718696a..cafe70f 100755
--- a/tests/regtest/regtest.sh
+++ b/tests/regtest/regtest.sh
@@ -346,7 +346,8 @@ if [[ $1 == "swapserver_forceclose" ]]; then
wait_for_balance bob 0.999
# check that the closing tx is in alice's onchain_history. Since this tx does not
# touch alice's wallet addresses, this test requires accounting_addresses to be set
- if [[ ! $($alice onchain_history| jq --arg txid $ctx_id '.[]|select(.txid == $txid)') ]]; then
+ $alice stop
+ if [[ ! $($alice -o onchain_history| jq --arg txid $ctx_id '.[]|select(.txid == $txid)') ]]; then
echo "accounting_address not set"
exit 1
fi
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.