dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Add block height support in rpc call getblock #2517

Open salisbury-espinosa opened 5 years ago

salisbury-espinosa commented 5 years ago

feature request: RPC getblock accepts height or hash in the upstream there are 2 unaccepted PR: https://github.com/bitcoin/bitcoin/pull/8457/files and duplicate https://github.com/bitcoin/bitcoin/pull/14858/files Rejection argument: https://github.com/bitcoin/bitcoin/pull/8457#issuecomment-244677759 Is there a place for these changes in dash?

UdjinM6 commented 5 years ago

This could be helpful probably but I agree with reasons provided for not merging it, at least for an overloaded version. If anything I would rather see smth like this implemented as a separate rpc (e.g. getblockbyheight as suggested in one of the comments) which would clearly state in its help text that this rpc returns a block in best-block-chain at height provided (as in getblockhash) meaning that results can change if there is a reorg later.

dashuser33 commented 5 years ago

As someone working with the RPC, plus one on not overloading existing commands. A new command is way better.

PastaPastaPasta commented 4 years ago

btw: there is an implementation here https://github.com/bitcoin/bitcoin/pull/16345 of this