-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix up the transaction JSON serialisation for RPC. #3633
Conversation
Shouldn't Looks good otherwise apart from the failing test. |
Changes Unknown when pulling 63c2825 on fix-tx-rpc into ** on master**. |
Changes Unknown when pulling 63c2825 on fix-tx-rpc into ** on master**. |
fn to_big_endian(&self, bytes: &mut[u8]); | ||
/// Convert to a non-zero-prefixed hex representation prefixed by `0x`. |
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.
not prefixed by 0x
@@ -685,6 +687,17 @@ macro_rules! construct_uint { | |||
} | |||
|
|||
#[inline] | |||
fn to_hex(&self) -> String { |
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 wonder if LowerHex
trait implementation would be more idiomatic, @rphmeier?
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.
perhaps, but we have to_hex
implemented for at least one other type used here and since this is bug fix PR i'd prefer to leave that for a second refactoring PR.
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.
Doing this via LowerHex
is indeed more idiomatic and should save allocation costs while formatting it as part of any other message (this is actually something to be mildly concerned about -- @arkpar and I found out recently that enabling any logging will cause the format arguments for all logs at that level, even with differing targets, to be evaluated)
Changes Unknown when pulling d58905a on fix-tx-rpc into ** on master**. |
No description provided.