-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Integrate v14 to txdecoder #46
Conversation
bin/tx-decoder/src/decoder.rs
Outdated
if self.is_version_new(version) { | ||
let decoder = self.new.get(&version.try_into()?).ok_or_else(|| anyhow!("version {} not found for new decoder", version))?; | ||
let ext = decoder.decode_extrinsics(data)?; | ||
// Ok(serde_json::to_string_pretty(&ext)?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it a trace
log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean for serde_json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to say that I assume this line is here for debugging purposes, to see the xt pretty printed, which seems useful. So maybe it could become a trace
level log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, it is. I actually just left it here to remind me to uncomment it at some point -- the output of decode_extrinsics
in v14 doesn't impl Serialize/Deserialize
yet. That's why i return a formatted debug log instead. I'll make this a WIP PR because it won't be merged until after v14 stuff is merged
for some quick testing!
this is a pretty quick&dirty impl/PoC (kindof created a poc decoder facade too i guess) for tx-decoder