diff --git a/src/client.rs b/src/client.rs index b0146ef9a8..5245a94af8 100644 --- a/src/client.rs +++ b/src/client.rs @@ -56,7 +56,7 @@ impl MemoryClient { let receipts = txs.into_iter().try_fold(vec![], |mut receipts, tx| { match interpreter.transact(tx) { Ok(state) => { - receipts.extend(state.receipts()); + receipts.extend(state.receipts().into_iter().cloned()); if !state.receipts().iter().any(|r| matches!(r, Receipt::Revert { .. })) { interpreter.as_mut().commit(); diff --git a/src/interpreter/flow.rs b/src/interpreter/flow.rs index 5884b1716c..2fdb248e6c 100644 --- a/src/interpreter/flow.rs +++ b/src/interpreter/flow.rs @@ -177,6 +177,7 @@ where a, b, digest, + self.memory[a as usize..ab].to_vec(), self.registers[REG_PC], self.registers[REG_IS], ); diff --git a/src/interpreter/log.rs b/src/interpreter/log.rs index 29c021f049..f0739c1efd 100644 --- a/src/interpreter/log.rs +++ b/src/interpreter/log.rs @@ -38,6 +38,7 @@ impl Interpreter { c, d, digest, + self.memory[c as usize..cd].to_vec(), self.registers[REG_PC], self.registers[REG_IS], ); diff --git a/tests/flow.rs b/tests/flow.rs index b6be71dfa8..78d47df54e 100644 --- a/tests/flow.rs +++ b/tests/flow.rs @@ -177,7 +177,7 @@ fn call() { } let state = Interpreter::transition(&mut storage, tx).expect("Failed to execute script"); - let receipt = state.receipts()[1]; + let receipt = state.receipts()[1].clone(); assert_eq!(receipt.ra().expect("Receipt value failed"), 0x11); assert_eq!(receipt.rb().expect("Receipt value failed"), 0x2a);