Skip to content

Use new decoder for each consensus change

Luke Champine requested to merge subscribe-api into master

The API subscription code used the same encoder to process the entire response body. Its allocation limit is 100e6 bytes, which is not sufficient to decode an entire blockchain. Compounding this bug was the deferred drainAndClose; after the decoder failed, drainAndClose would attempt to finish reading the response body before returning the error, which entailed reading the entire blockchain. This PR should fix both bugs.

Merge request reports