fix newHead serialization

This commit is contained in:
Bryan Stitt 2023-10-05 10:58:00 -07:00
parent f153b2b805
commit 32862937ad
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ impl Web3ProxyApp {
"params": {
"subscription": subscription_id,
// 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),
},
});

View File

@ -24,7 +24,7 @@ pub type BlocksByNumberCache = Cache<U64, H256>;
/// A block and its age with a less verbose serialized format
#[derive(Clone, Debug, Default)]
pub struct Web3ProxyBlock(ArcBlock);
pub struct Web3ProxyBlock(pub ArcBlock);
impl Serialize for Web3ProxyBlock {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>