pub fn height_from_signed_int(
index: i32,
tip_height: Height,
) -> RpcResult<Height>
Expand description
Given a potentially negative index, find the corresponding Height
.
This function is used to parse the integer index argument of get_block_hash
.
This is based on zcashd’s implementation:
https://github.com/zcash/zcash/blob/c267c3ee26510a974554f227d40a89e3ceb5bb4d/src/rpc/blockchain.cpp#L589-L618