aboutsummaryrefslogtreecommitdiffstats
path: root/crypto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.cpp')
-rw-r--r--crypto.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/crypto.cpp b/crypto.cpp
index b0785aca..3d818b41 100644
--- a/crypto.cpp
+++ b/crypto.cpp
@@ -450,16 +450,11 @@ BOOST_AUTO_TEST_CASE(eth_keypairs)
BOOST_REQUIRE(p.pub() == Public(fromHex("97466f2b32bc3bb76d4741ae51cd1d8578b48d3f1e68da206d47321aec267ce78549b514e4453d74ef11b0cd5e4e4c364effddac8b51bcfc8de80682f952896f")));
BOOST_REQUIRE(p.address() == Address(fromHex("8a40bfaa73256b60764c1bf40675a99083efb075")));
{
- eth::Transaction t;
- t.nonce = 0;
- t.type = eth::Transaction::MessageCall;
- t.receiveAddress = h160(fromHex("944400f4b88ac9589a0f17ed4671da26bddb668b"));
- t.value = 1000;
+ eth::Transaction t(1000, 0, 0, h160(fromHex("944400f4b88ac9589a0f17ed4671da26bddb668b")), bytes(), 0, p.secret());
auto rlp = t.rlp(false);
cnote << RLP(rlp);
cnote << toHex(rlp);
cnote << t.sha3(false);
- t.sign(p.secret());
rlp = t.rlp(true);
cnote << RLP(rlp);
cnote << toHex(rlp);
@@ -479,16 +474,11 @@ int cryptoTest()
BOOST_REQUIRE(p.pub() == Public(fromHex("97466f2b32bc3bb76d4741ae51cd1d8578b48d3f1e68da206d47321aec267ce78549b514e4453d74ef11b0cd5e4e4c364effddac8b51bcfc8de80682f952896f")));
BOOST_REQUIRE(p.address() == Address(fromHex("8a40bfaa73256b60764c1bf40675a99083efb075")));
{
- eth::Transaction t;
- t.nonce = 0;
- t.type = eth::Transaction::MessageCall;
- t.receiveAddress = h160(fromHex("944400f4b88ac9589a0f17ed4671da26bddb668b"));
- t.value = 1000;
+ eth::Transaction t(1000, 0, 0, h160(fromHex("944400f4b88ac9589a0f17ed4671da26bddb668b")), bytes(), 0, p.secret());
auto rlp = t.rlp(false);
cnote << RLP(rlp);
cnote << toHex(rlp);
cnote << t.sha3(false);
- t.sign(p.secret());
rlp = t.rlp(true);
cnote << RLP(rlp);
cnote << toHex(rlp);