tests: interface: fix estimatefee response (wrong unit)
What changed, and why it matters
This commit fixes a single test mock so that a fake server returns a realistic Bitcoin transaction fee estimate. The change only affects the test suite and has no impact on the real Electrum wallet or its users.
No security action required. Treat as a normal test-quality fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In tests/test_interface.py, the ToyServerSession._handle_estimatefee mock previously returned 1000 (satoshi per byte or an otherwise implausibly high value) and now returns 0.00001000 BTC/kB, matching the Bitcoin RPC estimatefee convention. This is a unit correction in test infrastructure only; no production code is modified.
Changed components
tests/test_interface.pyInspect captured patch +1 / −1
diff --git a/tests/test_interface.py b/tests/test_interface.py
index 18fcce7..0f9a0e2 100644
--- a/tests/test_interface.py
+++ b/tests/test_interface.py
@@ -179,7 +179,7 @@ class ToyServerSession(aiorpcx.RPCSession, Logger):
}
async def _handle_estimatefee(self, number, mode=None):
- return 1000
+ return 0.00001000
def _get_headersub_result(self):
return {'hex': BLOCK_HEADERS[self.cur_height].hex(), 'height': self.cur_height}
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.