mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(rpc): make memSize optional (#2999)
This commit is contained in:
@ -64,8 +64,8 @@ pub struct StructLog {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub memory: Option<Vec<String>>,
|
||||
/// Size of memory.
|
||||
#[serde(rename = "memSize")]
|
||||
pub memory_size: u64,
|
||||
#[serde(default, rename = "memSize", skip_serializing_if = "Option::is_none")]
|
||||
pub memory_size: Option<u64>,
|
||||
/// EVM stack
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub stack: Option<Vec<U256>>,
|
||||
@ -326,3 +326,15 @@ pub struct GethDebugTracingCallOptions {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub block_overrides: Option<BlockOverrides>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
// <https://etherscan.io/tx/0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5>
|
||||
#[test]
|
||||
fn serde_default_frame() {
|
||||
let input = include_str!("../../../../test_data/default/structlogs_01.json");
|
||||
let _frame: DefaultFrame = serde_json::from_str(input).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user