gossamer icon indicating copy to clipboard operation
gossamer copied to clipboard

use scale `Encoder` in trie code

Open qdm12 opened this issue 2 years ago • 0 comments

Trie code uses scale.Marshal in a few places and then copies the resulting scale encoded byte slice to another io.Writer (usually a bytes buffer). We could save those copying operations by using the scale Encoder (merged in #2741) so write directly to the target io.Writer.

That would also make the trie code more 'stream oriented'.

qdm12 avatar Aug 16 '22 19:08 qdm12