[Rust SDK] block fetching
Opened this issue ยท 0 comments
0xmemorygrinder commented
๐ Bug
I use the aptos rust sdk to fetch a block at a specific height. Everything works fine for various blocks, however I get a parse error on this height : 261400138.
I manually downloaded the block from the rpc and evrything seems good.
I tried with various RPCs, to be sure the problem was not linked to this.
The issue seems to be a field that is optional but not marked as it for serde.
To reproduce
Code snippet to reproduce
let block = self.rest_client.get_block_by_height(261400138, true).await?;
Stack trace/error message
RestClientError(Unknown(error decoding response body: missing field type at line 1 column 109135))
Expected Behavior
The block should be parsed and usable as others.
System information
Please complete the following information:
- Aptos Core Version : devnet branch
- Rust Version: 1.81
- Computer OS: ubuntu