diff options
author | subtly <subtly@users.noreply.github.com> | 2014-11-05 23:11:06 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2014-11-05 23:11:06 +0800 |
commit | 90a0998968e88dc9fc65476c963b028c0eeaeff4 (patch) | |
tree | 01c116b51ff940a550c03356d793abfc661a8075 /crypto.cpp | |
parent | 25811ce5ff6575d1cfc7238a40b0347248336693 (diff) | |
parent | aa41f1c6f1f0cbed7fe21005aab6562cb2588ea4 (diff) | |
download | dexon-solidity-90a0998968e88dc9fc65476c963b028c0eeaeff4.tar.gz dexon-solidity-90a0998968e88dc9fc65476c963b028c0eeaeff4.tar.zst dexon-solidity-90a0998968e88dc9fc65476c963b028c0eeaeff4.zip |
Merge branch 'develop' into crypto
Diffstat (limited to 'crypto.cpp')
-rw-r--r-- | crypto.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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); |