From 9d3049bac00add8b6b1b34731c06b3734f756aae Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 3 Feb 2016 17:07:12 +0100 Subject: [PATCH] Revert removal of `new_code`. --- ethcore/src/transaction.rs | 18 ++++++++++++++++++ install-deps.sh | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ethcore/src/transaction.rs b/ethcore/src/transaction.rs index 00ea784d4..0fcd4f410 100644 --- a/ethcore/src/transaction.rs +++ b/ethcore/src/transaction.rs @@ -67,6 +67,24 @@ impl Transaction { } } + /// Create a new message-call transaction. + #[cfg(test)] + pub fn new_call(to: Address, value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction { + Transaction { + nonce: nonce, + gas_price: gas_price, + gas: gas, + action: Action::Call(to), + value: value, + data: data, + v: 0, + r: x!(0), + s: x!(0), + hash: RefCell::new(None), + sender: RefCell::new(None), + } + } + /// Create a new contract-creation transaction. #[cfg(test)] pub fn new_create(value: U256, data: Bytes, gas: U256, gas_price: U256, nonce: U256) -> Transaction { diff --git a/install-deps.sh b/install-deps.sh index b10d373b7..15b863682 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -463,4 +463,4 @@ function run_installer() finish } -run_installer \ No newline at end of file +run_installer