fix: _handle_get_state calls _signed_content with wrong arity (#2288)#2573
Conversation
|
Diff is clean — 1 file, +15/-15, surgical fix, covers both the One remaining acceptance criterion before merge: #2288 item 3 — a regression test under Minimal shape: # node/tests/test_handle_get_state_arity.py
def test_handle_get_state_does_not_raise():
layer = _make_layer(...)
response = layer._handle_get_state(msg=...)
# Criterion 1: no TypeError
assert response["status"] == "ok"
# Criterion 2: msg_id + ttl present so verify_message can reconstruct signed content
assert "msg_id" in response
assert response["ttl"] == 0
# Round-trip: feed response back into verify_message and confirm signature checks
verifier = _make_layer(...)
# ... build GossipMessage from response, call verify_message, assert TrueOnce you push that test to this branch, I'll merge + process the 25 RTC to your wallet If adding the test slips past Apr 21, we can split the bounty: 20 RTC on merge of the fix-only PR, 5 RTC micro-bounty on a follow-up test PR (to anyone). |
Fixes TypeError missing 'msg_id' and 'ttl' when handling GET_STATE requests. Generates a synthetic msg_id and uses static ttl=0 for state responses. Closes #2288.