feat(db): Don't store TxHash when writing to the table (#2279)

This commit is contained in:
joshieDo
2023-04-21 17:15:52 +08:00
committed by GitHub
parent 2e7139c1ae
commit 9452b3658b
25 changed files with 358 additions and 118 deletions

View File

@ -144,7 +144,7 @@ fn should_use_alt_impl(ftype: &String, segment: &syn::PathSegment) -> bool {
if let (Some(path), 1) =
(arg_path.path.segments.first(), arg_path.path.segments.len())
{
if ["H256", "H160", "Address", "Bloom"]
if ["H256", "H160", "Address", "Bloom", "TxHash"]
.contains(&path.ident.to_string().as_str())
{
return true
@ -160,11 +160,11 @@ fn should_use_alt_impl(ftype: &String, segment: &syn::PathSegment) -> bool {
/// length.
pub fn get_bit_size(ftype: &str) -> u8 {
match ftype {
"bool" | "Option" => 1,
"TransactionKind" | "bool" | "Option" | "Signature" => 1,
"TxType" => 2,
"u64" | "BlockNumber" | "TxNumber" | "ChainId" | "NumTransactions" => 4,
"u128" => 5,
"U256" | "TxHash" => 6,
"U256" => 6,
_ => 0,
}
}