Make NumberOrHex a common primitive. (#6321)

* Make NumberOrHex a common primitive.

* Update primitives/rpc/src/number.rs

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
Sergei Shulepov
2020-06-10 17:08:15 +02:00
committed by GitHub
parent 62412ab03c
commit 3ec4844616
5 changed files with 103 additions and 60 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ pub trait ChainApi<Number, Hash, Header, SignedBlock> {
#[rpc(name = "chain_getBlockHash", alias("chain_getHead"))]
fn block_hash(
&self,
hash: Option<ListOrValue<NumberOrHex<Number>>>,
hash: Option<ListOrValue<NumberOrHex>>,
) -> Result<ListOrValue<Option<Hash>>>;
/// Get hash of the last finalized block in the canon chain.