aboutsummaryrefslogtreecommitdiffstats
path: root/stateOriginal.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-04-14 00:12:05 +0800
committerGav Wood <i@gavwood.com>2015-04-14 18:56:58 +0800
commitefdd3790a0405654933f456751230254cef95151 (patch)
tree49858d780698755113eae1aa88dca3e423ceed90 /stateOriginal.cpp
parentd0efe9333fc88bae5ab82ef0435d99d9be4e21d4 (diff)
downloaddexon-solidity-efdd3790a0405654933f456751230254cef95151.tar
dexon-solidity-efdd3790a0405654933f456751230254cef95151.tar.gz
dexon-solidity-efdd3790a0405654933f456751230254cef95151.tar.bz2
dexon-solidity-efdd3790a0405654933f456751230254cef95151.tar.lz
dexon-solidity-efdd3790a0405654933f456751230254cef95151.tar.xz
dexon-solidity-efdd3790a0405654933f456751230254cef95151.tar.zst
dexon-solidity-efdd3790a0405654933f456751230254cef95151.zip
Various fixes for mining.
Diffstat (limited to 'stateOriginal.cpp')
-rw-r--r--stateOriginal.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/stateOriginal.cpp b/stateOriginal.cpp
index 40f75943..e1a3c7c4 100644
--- a/stateOriginal.cpp
+++ b/stateOriginal.cpp
@@ -25,7 +25,9 @@
#include <secp256k1/secp256k1.h>
#include <libethereum/CanonBlockChain.h>
#include <libethereum/State.h>
+#include <libethereum/Farm.h>
#include <libethereum/Defaults.h>
+#include "TestHelper.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
@@ -67,10 +69,8 @@ BOOST_AUTO_TEST_CASE(Complex)
cout << s;
// Mine to get some ether!
- s.commitToMine(bc);
- ProofOfWork pow;
- while (!s.mine(&pow).completed) {}
- s.completeMine();
+ mine(s, bc);
+
bc.attemptImport(s.blockData(), stateDB);
cout << bc;
@@ -89,8 +89,7 @@ BOOST_AUTO_TEST_CASE(Complex)
// Mine to get some ether and set in stone.
s.commitToMine(bc);
s.commitToMine(bc);
- while (!s.mine(&pow).completed) {}
- s.completeMine();
+ mine(s, bc);
bc.attemptImport(s.blockData(), stateDB);
cout << bc;