Skip to content

Commit

Permalink
Merge pull request #4815 from libraries/public_data_location
Browse files Browse the repository at this point in the history
chore(script): make DataLocation public
  • Loading branch information
zhangsoledad authored Feb 26, 2025
2 parents 6c3ac8b + 550fdf1 commit c53044e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub use crate::error::{ScriptError, TransactionScriptError};
pub use crate::scheduler::{Scheduler, ROOT_VM_ID};
pub use crate::syscalls::generator::generate_ckb_syscalls;
pub use crate::types::{
ChunkCommand, CoreMachine, DataPieceId, RunMode, ScriptGroup, ScriptGroupType, ScriptVersion,
TransactionState, TxData, VerifyResult, VmIsa, VmState, VmVersion,
ChunkCommand, CoreMachine, DataLocation, DataPieceId, RunMode, ScriptGroup, ScriptGroupType,
ScriptVersion, TransactionState, TxData, VerifyResult, VmIsa, VmState, VmVersion,
};
pub use crate::verify::TransactionScriptsVerifier;
pub use crate::verify_env::TxVerifyEnv;
4 changes: 4 additions & 0 deletions script/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,14 @@ pub enum VmState {
WaitForRead(ReadState),
}

/// Used to specify the location of script data.
#[derive(Clone, Debug)]
pub struct DataLocation {
/// A pointer to the data.
pub data_piece_id: DataPieceId,
/// Data offset.
pub offset: u64,
/// Data length.
pub length: u64,
}

Expand Down

0 comments on commit c53044e

Please sign in to comment.