mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-08-27 04:11:08 +00:00
docs(lez): drop repeated update_from_diff passthrough comment
The same "diff_data is already the fully-computed encoding, so this is a passthrough" explanation was copy-pasted across 13 update_from_diff implementations. The general contract is already documented once, centrally, on ProgramCall::UpdateFromDiff in lee_core; each per-program repeat added nothing beyond what the unused _pre_state parameter and a one-line body already convey.
This commit is contained in:
@@ -64,8 +64,6 @@ fn main() {
|
||||
.write();
|
||||
}
|
||||
|
||||
/// The new data value, when written, is always a fully-computed byte blob assigned directly, so
|
||||
/// materializing it from `diff_data` is a passthrough.
|
||||
fn update_from_diff(
|
||||
_pre_state: Account,
|
||||
diff_data: Data,
|
||||
|
||||
@@ -57,8 +57,6 @@ fn main() {
|
||||
.write();
|
||||
}
|
||||
|
||||
/// The new data value is always a fully-computed byte blob assigned directly, so materializing
|
||||
/// it from `diff_data` is a passthrough.
|
||||
fn update_from_diff(
|
||||
_pre_state: Account,
|
||||
diff_data: Data,
|
||||
|
||||
@@ -34,9 +34,6 @@ pub fn unchanged(account_id: AccountId) -> AccountDiffOutput {
|
||||
})
|
||||
}
|
||||
|
||||
/// Every data write in this program (always the pool account) replaces its data wholesale with
|
||||
/// an already-fully-computed `PoolDefinition` encoding, so `diff_data` already *is* the new data
|
||||
/// verbatim — materializing it is a passthrough.
|
||||
pub fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -14,9 +14,6 @@ use lee_core::{
|
||||
};
|
||||
use wrapped_token_core::{Instruction as WrappedInstruction, MAX_MINT_AMOUNT};
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding, so `diff_data` already *is* the new data verbatim —
|
||||
/// materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ use lee_core::{
|
||||
},
|
||||
};
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding, so `diff_data` already *is* the new data verbatim —
|
||||
/// materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@ use lee_core::{
|
||||
},
|
||||
};
|
||||
|
||||
/// The record is fully computed before being written, so `diff_data` already *is* the new data
|
||||
/// verbatim — materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -113,8 +113,6 @@ fn main() {
|
||||
.write();
|
||||
}
|
||||
|
||||
/// The challenge's next-data is fully computed before being written, so `diff_data` already *is*
|
||||
/// the new data verbatim — materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -136,8 +136,6 @@ fn main() {
|
||||
.write();
|
||||
}
|
||||
|
||||
/// The challenge's next-data is fully computed before being written, so `diff_data` already *is*
|
||||
/// the new data verbatim — materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ use ping_core::{
|
||||
receiver_config_account_id, receiver_config_seed,
|
||||
};
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding, so `diff_data` already *is* the new data verbatim —
|
||||
/// materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -12,9 +12,6 @@ use ping_core::{
|
||||
SenderInstruction, outbox_bytes, read_outbox, sender_config_account_id, sender_config_seed,
|
||||
};
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding, so `diff_data` already *is* the new data verbatim —
|
||||
/// materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -97,9 +97,6 @@ fn main() {
|
||||
.write();
|
||||
}
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding (`StakeRecord`/`SequencerStakeConfig` bytes), so `diff_data`
|
||||
/// already *is* the new data verbatim — materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -15,9 +15,6 @@ pub mod transfer;
|
||||
|
||||
mod tests;
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding (`TokenDefinition`/`TokenHolding`/`TokenMetadata`), so
|
||||
/// `diff_data` already *is* the new data verbatim — materializing it is a passthrough.
|
||||
pub fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ use wrapped_token_core::{
|
||||
config_seed, holding_account_id, holding_seed, read_balance,
|
||||
};
|
||||
|
||||
/// Every data write in this program replaces the account's data wholesale with an
|
||||
/// already-fully-computed encoding, so `diff_data` already *is* the new data verbatim —
|
||||
/// materializing it is a passthrough.
|
||||
fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
|
||||
Ok(diff_data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user