aboutsummaryrefslogtreecommitdiffstats
path: root/crypto.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-11-05 21:45:19 +0800
committerGav Wood <i@gavwood.com>2014-11-05 21:45:19 +0800
commit07ee2e48477ba411722bb05d9714ec734f1760bb (patch)
treece60c0d566f95e96bd27796a17a5e272bcc10497 /crypto.cpp
parentb01be526db60e56be76792b2d1e8cfa63b2c8f06 (diff)
downloaddexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.tar.gz
dexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.tar.zst
dexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.zip
Classify Transaction.
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 67286bfc..2f531442 100644
--- a/crypto.cpp
+++ b/crypto.cpp
@@ -339,16 +339,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);
@@ -368,16 +363,11 @@ int cryptoTest()
assert(p.pub() == Public(fromHex("97466f2b32bc3bb76d4741ae51cd1d8578b48d3f1e68da206d47321aec267ce78549b514e4453d74ef11b0cd5e4e4c364effddac8b51bcfc8de80682f952896f")));
assert(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);