mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Feedback
This commit is contained in:
parent
8bb45203f9
commit
3b54ec3986
@ -137,6 +137,10 @@ impl<'a> Interpreter<'a> {
|
||||
self.memory.context_memory[0].segments[Segment::TxnFields as usize].content[field as usize]
|
||||
}
|
||||
|
||||
pub(crate) fn get_txn_data(&self) -> &[U256] {
|
||||
&self.memory.context_memory[0].segments[Segment::TxnData as usize].content
|
||||
}
|
||||
|
||||
pub(crate) fn set_rlp_memory(&mut self, rlp: Vec<u8>) {
|
||||
self.memory.context_memory[0].segments[Segment::RlpRaw as usize].content =
|
||||
rlp.into_iter().map(U256::from).collect();
|
||||
|
||||
@ -46,6 +46,7 @@ fn process_type_0_txn() -> Result<()> {
|
||||
assert_eq!(interpreter.get_txn_field(To), 0.into());
|
||||
assert_eq!(interpreter.get_txn_field(Value), 100.into());
|
||||
assert_eq!(interpreter.get_txn_field(DataLen), 2.into());
|
||||
assert_eq!(interpreter.get_txn_data(), &[0x42.into(), 0x42.into()]);
|
||||
assert_eq!(interpreter.get_txn_field(YParity), 1.into());
|
||||
assert_eq!(
|
||||
interpreter.get_txn_field(R),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user