clean-up some u64 sizes and replace with u32 or u8 for those vector length and so on.
CompactBlockBody 3 vector length:
pub struct CompactBlockBody {
/// List of full outputs - specifically the coinbase output(s)
pub out_full: Vec<Output>,
/// List of full kernels - specifically the coinbase kernel(s)
pub kern_full: Vec<TxKernel>,
/// List of transaction kernels, excluding those in the full list
/// (short_ids)
pub kern_ids: Vec<ShortId>,
}
2. `MerkleProof` path vector length:
```Rust
pub struct MerkleProof {
/// The size of the MMR at the time the proof was created.
pub mmr_size: u64,
/// The sibling path from the leaf up to the final sibling hashing to the
/// root.
pub path: Vec<Hash>,
}
TransactionBody 3 vector length:
pub struct TransactionBody {
/// List of inputs by the transaction.
pub inputs: Vec<InputEx>,
/// List of outputs the transaction produces.
pub outputs: Vec<Output>,
/// List of kernels that make up this transaction (usually a single kernel).
pub kernels: Vec<TxKernel>,
}
MsgHeadermsg_len. This one we still use u64 in the structure definition but use u32 in the serialization/deserialization. At this moment, I'm not sure whether it's a good idea to directly replace this msg_len with u32 type, I will check it later.
pub struct MsgHeader {
magic: [u8; 2],
/// Type of the message.
pub msg_type: Type,
/// Total length of the message in bytes.
pub msg_len: u64,
}
clean-up some u64 sizes and replace with u32 or u8 for those vector length and so on.
CompactBlockBody
3 vector length:TransactionBody
3 vector length:MsgHeader
msg_len
. This one we still useu64
in the structure definition but useu32
in the serialization/deserialization. At this moment, I'm not sure whether it's a good idea to directly replace thismsg_len
withu32
type, I will check it later.