aboutsummaryrefslogtreecommitdiffstats
path: root/blockchain.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-03-30 01:13:39 +0800
committerGav Wood <i@gavwood.com>2015-03-30 01:13:39 +0800
commit5e28d981c729a929a37ba761e86a47de08ce9456 (patch)
tree3f9bf122e30a6b5e7d156842b7f1b9117ad7f35b /blockchain.cpp
parentc188e94273f9f9be27b4bfd67e44800f0504eb6a (diff)
downloaddexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar.gz
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar.bz2
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar.lz
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar.xz
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.tar.zst
dexon-solidity-5e28d981c729a929a37ba761e86a47de08ce9456.zip
Refactored much of transaction queue for tidiness and optimisation.
Diffstat (limited to 'blockchain.cpp')
-rw-r--r--blockchain.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/blockchain.cpp b/blockchain.cpp
index 50ca22c5..988859fe 100644
--- a/blockchain.cpp
+++ b/blockchain.cpp
@@ -182,18 +182,17 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
Transactions txList;
for (auto const& txi: txs.transactions())
{
- Transaction tx(txi.second, CheckSignature::Sender);
- txList.push_back(tx);
+ txList.push_back(txi.second);
mObject txObject;
- txObject["nonce"] = toString(tx.nonce());
- txObject["data"] = "0x" + toHex(tx.data());
- txObject["gasLimit"] = toString(tx.gas());
- txObject["gasPrice"] = toString(tx.gasPrice());
- txObject["r"] = "0x" + toString(tx.signature().r);
- txObject["s"] = "0x" + toString(tx.signature().s);
- txObject["v"] = to_string(tx.signature().v + 27);
- txObject["to"] = tx.isCreation() ? "" : toString(tx.receiveAddress());
- txObject["value"] = toString(tx.value());
+ txObject["nonce"] = toString(txi.second.nonce());
+ txObject["data"] = "0x" + toHex(txi.second.data());
+ txObject["gasLimit"] = toString(txi.second.gas());
+ txObject["gasPrice"] = toString(txi.second.gasPrice());
+ txObject["r"] = "0x" + toString(txi.second.signature().r);
+ txObject["s"] = "0x" + toString(txi.second.signature().s);
+ txObject["v"] = to_string(txi.second.signature().v + 27);
+ txObject["to"] = txi.second.isCreation() ? "" : toString(txi.second.receiveAddress());
+ txObject["value"] = toString(txi.second.value());
txArray.push_back(txObject);
}