tbc: cache raw block bytes instead of decoding and re-encoding #187
Labels
area: tbc
This is a change to TBC (Tiny Bitcoin)
size: L
This change is large (+/- <500)
type: enhancement
This improves existing functionality
type: refactor
This refactors existing functionality
Confirmation
Problem
TBC currently uses btcd's
wire
package to decode and encode blocks.This can result in data loss if the
wire
package does not decode certain data, as it will not retain data it doesn't know to retain.Suggested solution
Instead of decoding and re-encoding blocks in TBC, we should cache the raw block bytes and decode it once, then store the raw bytes for later use.
Additional Information
No response
The text was updated successfully, but these errors were encountered: