diff options
author | Gav Wood <i@gavwood.com> | 2014-11-05 21:45:19 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2014-11-05 21:45:19 +0800 |
commit | 07ee2e48477ba411722bb05d9714ec734f1760bb (patch) | |
tree | ce60c0d566f95e96bd27796a17a5e272bcc10497 /crypto.cpp | |
parent | b01be526db60e56be76792b2d1e8cfa63b2c8f06 (diff) | |
download | dexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.tar.gz dexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.tar.zst dexon-solidity-07ee2e48477ba411722bb05d9714ec734f1760bb.zip |
Classify Transaction.
Diffstat (limited to 'crypto.cpp')
-rw-r--r-- | crypto.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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); |