paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.8k stars 652 forks source link

Always check the length of extrinsic #5795

Open gui1117 opened 6 days ago

gui1117 commented 6 days ago

Current code uses remaining_len to check the length of extrinsic.

But remaining_len returns None for some input, when the length of input is not known.

This would be a more correct refactor using a new input wrapper not yet merged in parity-scale-codec: https://github.com/paritytech/parity-scale-codec/pull/630