cleanup(state): Update some outdated comments in the state & rpcs (#7434)
* Add a module cleanup TODO * Fix an unrelated comment * Update the comments about the bincode legacy format
This commit is contained in:
parent
349af4d575
commit
735330618e
|
@ -41,6 +41,8 @@ use crate::methods::{
|
|||
check_miner_address, check_synced_to_tip, fetch_mempool_transactions,
|
||||
fetch_state_tip_and_local_time, validate_block_proposal,
|
||||
},
|
||||
// TODO: move the types/* modules directly under get_block_template_rpcs,
|
||||
// and combine any modules with the same names.
|
||||
types::{
|
||||
get_block_template::GetBlockTemplate,
|
||||
get_mining_info,
|
||||
|
|
|
@ -31,6 +31,13 @@ impl FromDisk for ValueBalance<NonNegative> {
|
|||
}
|
||||
}
|
||||
|
||||
// The following implementations for history trees use `serde` and
|
||||
// `bincode`. `serde` serializations depend on the inner structure of the type.
|
||||
// They should not be used in new code. (This is an issue for any derived serialization format.)
|
||||
//
|
||||
// We explicitly use `bincode::DefaultOptions` to disallow trailing bytes; see
|
||||
// https://docs.rs/bincode/1.3.3/bincode/config/index.html#options-struct-vs-bincode-functions
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
struct HistoryTreeParts {
|
||||
network: Network,
|
||||
|
|
|
@ -96,10 +96,10 @@ impl FromDisk for orchard::tree::Root {
|
|||
}
|
||||
|
||||
// The following implementations for the note commitment trees use `serde` and
|
||||
// `bincode` because currently the inner Merkle tree frontier (from
|
||||
// `incrementalmerkletree`) only supports `serde` for serialization. `bincode`
|
||||
// was chosen because it is small and fast. We explicitly use `DefaultOptions`
|
||||
// in particular to disallow trailing bytes; see
|
||||
// `bincode`. `serde` serializations depend on the inner structure of the type.
|
||||
// They should not be used in new code. (This is an issue for any derived serialization format.)
|
||||
//
|
||||
// We explicitly use `bincode::DefaultOptions` to disallow trailing bytes; see
|
||||
// https://docs.rs/bincode/1.3.3/bincode/config/index.html#options-struct-vs-bincode-functions
|
||||
|
||||
impl IntoDisk for sprout::tree::NoteCommitmentTree {
|
||||
|
|
Loading…
Reference in New Issue