input-output-hk / rust-byron-cardano

rust client libraries to deal with the current cardano mainnet (byron / cardano-sl)
MIT License
264 stars 75 forks source link

network: Added method PullHeaders #714

Closed mzabaluev closed 5 years ago

mzabaluev commented 5 years ago

Reusing some NTT prior art, add a method that pulls blockchain headers between one of the checkpoint IDs of blocks present at the requester, and the ID of a block, ostensibly discovered from a new block announcement, up to which the chain needs to be retrieved.

Also lay some ground for a possible PullBlocks method (it already existed in the NTT support APIs as pull_blocks_to, now renamed) that does not need to have a different response stream than the one PullBlocksToTip produces, but may return a different future type to accommodate the different protocol exchange.