Repository navigation
Answer electrum non-version openers and non-post http methods. - #1091
Conversation
|
Thanks, this fixes everything raised before. Re-dispatching the opener through the channel gives it a real gate, and the async ordering test proves it. OPTIONS now matches bitcoind, and start() is much simpler. One remaining issue: the opener is normalized at version 0.0. channel_electrum::dispatch runs electrum_request(...) on the request in place before the handshake, while version_ is still v0_0. The retained opener keeps that result. When it’s dispatched again at version_floor(protocol_minimum), the version-dependent normalization has already happened at the wrong version. Concretely, below 1.1 blockchain.transaction.get drops its second parameter as the legacy height. At 1.1 and above, that parameter is verbose. So an opener of blockchain.transaction.get(txid, true) is answered with the raw tx instead of the verbose result. Please don’t apply version-dependent normalization to a non-server.version message while the version is unset (v0_0). The opener is then normalized once, at the version it’s actually served at. A test with a verbose blockchain.transaction.get opener would cover it. |
|
Addressed in : electrum_request no longer applies version-dependent Added electrum__server_version__non_version_opener_verbose__expected |
Two electrum requests were not answered while the connection was held:
handshake but was dropped. The opener is now kept on the channel and
dispatched by protocol_electrum once attached (before resume), so it is
answered with its id at the negotiated version.
had no subscriber. protocol_rpc now responds 405, once per request.
Tests: electrum__get__/electrum__options__ (405), and
electrum__server_version__non_version_opener__answered/_unknown__method_not_found;
existing opener tests now read the opener response first.