fix newHead serialization
This commit is contained in:
parent
f153b2b805
commit
32862937ad
@ -104,7 +104,7 @@ impl Web3ProxyApp {
|
|||||||
"params": {
|
"params": {
|
||||||
"subscription": subscription_id,
|
"subscription": subscription_id,
|
||||||
// TODO: option to include full transaction objects instead of just the hashes?
|
// TODO: option to include full transaction objects instead of just the hashes?
|
||||||
"result": subscription_web3_request.head_block,
|
"result": subscription_web3_request.head_block.as_ref().map(|x| &x.0),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ pub type BlocksByNumberCache = Cache<U64, H256>;
|
|||||||
|
|
||||||
/// A block and its age with a less verbose serialized format
|
/// A block and its age with a less verbose serialized format
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct Web3ProxyBlock(ArcBlock);
|
pub struct Web3ProxyBlock(pub ArcBlock);
|
||||||
|
|
||||||
impl Serialize for Web3ProxyBlock {
|
impl Serialize for Web3ProxyBlock {
|
||||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||||
|
Loading…
Reference in New Issue
Block a user