forked from lthn/blockchain
fixed bug with payment id visualisation
This commit is contained in:
parent
d641dd6d60
commit
97e721f5f5
4 changed files with 24 additions and 4 deletions
|
|
@ -64,6 +64,23 @@ namespace epee
|
|||
epee::string_tools::hex_to_pod(a, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
//basic helpers for blob-to-hex serialization
|
||||
|
||||
inline std::string transform_binbuf_to_hexstr(const std::string& a)
|
||||
{
|
||||
return epee::string_tools::buff_to_hex_nodelimer(a);
|
||||
}
|
||||
|
||||
inline std::string transform_hexstr_to_binbuff(const std::string& a)
|
||||
{
|
||||
std::string res;
|
||||
if (!epee::string_tools::parse_hexstr_to_binbuff(a, res))
|
||||
{
|
||||
CHECK_AND_ASSERT_THROW_MES(false, "Failed to parse hex string:" << a);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ public: \
|
|||
#define KV_SERIALIZE_POD_AS_HEX_STRING_N(varialble, val_name) \
|
||||
KV_SERIALIZE_CUSTOM_N(varialble, std::string, epee::transform_t_pod_to_str<decltype(varialble)>, epee::transform_str_to_t_pod<decltype(varialble)>, val_name)
|
||||
|
||||
|
||||
#define KV_SERIALIZE_BLOB_AS_HEX_STRING_N(varialble, val_name) \
|
||||
KV_SERIALIZE_CUSTOM_N(varialble, std::string, epee::transform_binbuf_to_hexstr, epee::transform_hexstr_to_binbuff, val_name)
|
||||
|
||||
|
||||
#define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, val_name) \
|
||||
|
|
@ -99,6 +100,8 @@ public: \
|
|||
#define KV_SERIALIZE_CONTAINER_POD_AS_BLOB(varialble) KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(varialble, #varialble)
|
||||
#define KV_SERIALIZE_CUSTOM(varialble, stored_type, from_v_to_stored, from_stored_to_v) KV_SERIALIZE_CUSTOM_N(varialble, stored_type, from_v_to_stored, from_stored_to_v, #varialble)
|
||||
#define KV_SERIALIZE_POD_AS_HEX_STRING(varialble) KV_SERIALIZE_POD_AS_HEX_STRING_N(varialble, #varialble)
|
||||
#define KV_SERIALIZE_BLOB_AS_HEX_STRING(varialble) KV_SERIALIZE_BLOB_AS_HEX_STRING_N(varialble, #varialble)
|
||||
|
||||
|
||||
|
||||
#define KV_CHAIN_MAP(variable_obj) epee::namespace_accessor<decltype(this_ref.variable_obj)>::template serialize_map<is_store>(this_ref.variable_obj, stg, hparent_section);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ namespace wallet_rpc
|
|||
KV_SERIALIZE(height)
|
||||
KV_SERIALIZE(unlock_time)
|
||||
KV_SERIALIZE(tx_blob_size)
|
||||
KV_SERIALIZE(payment_id)
|
||||
KV_SERIALIZE_BLOB_AS_HEX_STRING(payment_id)
|
||||
KV_SERIALIZE(remote_addresses)
|
||||
KV_SERIALIZE(recipients_aliases)
|
||||
KV_SERIALIZE(comment)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
"maj":1,
|
||||
"min":0,
|
||||
"rev":0,
|
||||
"build":37,
|
||||
"build":40,
|
||||
"cs":[
|
||||
{
|
||||
"build":37,
|
||||
"build":40,
|
||||
"mode":3
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue