quorumcontrol / dgit

dgit adds decentralized ownership to git - powered by Tupelo DLT and Skynet
https://dgit.dev/
MIT License
208 stars 16 forks source link

Ensure zlib buffer is closed before writing objects to storage #55

Closed brandonwestcott closed 4 years ago

brandonwestcott commented 4 years ago

All of the skynet objects were only getting the zlib header because the defer writer.Close() wasn't triggering till after the skynet upload call. This ensures the buffer is always called by pulling it out into its own method, used in both chaintree and sia stores, and then adds a test (which fails without the close).