les: fix TxStatus message format#15956
Conversation
|
Why doens't the current code work? Can't we fix it instead of reintroducing the weird combo field? |
|
I.e. if we change the |
|
No, there is a problem with the Lookup field too. If I leave it as a pointer then encoding/decoding is inconsistent. If I change it to core.TxLookupEntry then the entire struct (including an empty hash) is always encoded every time I just want to poll a pending tx, which I'd hate a lot more than the combo field. |
|
Hmm, does this not work by design, or perhaps it's an issue with our RLP encoder? @fjl? |
|
I think by design. There has to be something telling the decoder whether to expect a struct there or not. One thing we could do is change it to []core.TxLookupEntry which has either 0 or 1 elements. Not sure if it is nicer than the combo field either though. |
|
The |
|
Are any of those pointer fields ever |
Replaced by #15974
This PR fixes #15943
Problem: LES/2 clients dropped LES/2 servers after receiving a TxStatusMsg in response to SendTxsV2 because the message format of les.txStatus was broken (unable to RLP decode).
Solution: the message format has been changed back to the original format implemented in the original LES/2 PR before the cleanup. Changing the message format at this point is fine because it never worked until now anyway.