Browse Source

Tentative registry included in Genesis.

cl-refactor
Gav Wood 10 years ago
parent
commit
b8461cb8b9
  1. 4
      alethzero/MainWin.cpp
  2. 7
      libethereum/CanonBlockChain.cpp

4
alethzero/MainWin.cpp

@ -28,6 +28,7 @@
#include <QtWebEngine/QtWebEngine>
#include <QtWebEngineWidgets/QWebEngineView>
#include <QtWebEngineWidgets/QWebEngineCallback>
#include <QtWebEngineWidgets/QWebEngineSettings>
#include <QtGui/QClipboard>
#include <QtCore/QtCore>
#include <boost/algorithm/string.hpp>
@ -110,6 +111,7 @@ Main::Main(QWidget *parent) :
ui(new Ui::Main),
m_transact(this, this)
{
QtWebEngine::initialize();
setWindowFlags(Qt::Window);
ui->setupUi(this);
g_logPost = [=](string const& s, char const* c)
@ -171,7 +173,7 @@ Main::Main(QWidget *parent) :
ui->tabWidget->setTabText(0, ui->webView->title());
});
ui->webView->page()->settings()->setAttribute(QWebEngineSettings::DeveloperExtrasEnabled, true);
// ui->webView->page()->settings()->setAttribute(QWebEngineSettings::DeveloperExtrasEnabled, true);
// QWebEngineInspector* inspector = new QWebEngineInspector();
// inspector->setPage(page);
readSettings();

7
libethereum/CanonBlockChain.cpp

@ -29,17 +29,20 @@
#include <libethcore/ProofOfWork.h>
#include <libethcore/BlockInfo.h>
#include <liblll/Compiler.h>
#include <libsolidity/CompilerStack.h>
#include "State.h"
#include "Defaults.h"
using namespace std;
using namespace dev;
using namespace dev::eth;
using namespace dev::solidity;
#define ETH_CATCH 1
std::map<Address, Account> const& dev::eth::genesisState()
{
static std::map<Address, Account> s_ret;
if (s_ret.empty())
{
// Initialise.
@ -54,10 +57,14 @@ std::map<Address, Account> const& dev::eth::genesisState()
"e4157b34ea9615cfbde6b4fda419828124b70c78"
}))
s_ret[Address(fromHex(i))] = Account(u256(1) << 200, Account::NormalCreation);
s_ret[Address(1)] = Account(0, Account::ContractConception);
s_ret[Address(2600)].setCode(fromHex("60e060020a60003504806301984892146100ba5780631c83171b146100cf578063449c2090146100e05780635d574e32146100fe5780635fd4b08a14610112578063618242da146101275780636be16bed1461013c5780636c4489b41461014d5780637d2e3ce914610180578063994d29cc146101935780639e71f357146101a8578063b8202c18146101bc578063c284bc2a146101d0578063e50f599a146101e1578063e5811b35146101f8578063ec7b92001461021657005b6100c5600435610652565b8060005260206000f35b6100da600435610446565b60006000f35b6100eb600435610426565b80600160a060020a031660005260206000f35b61010c600435602435610324565b60006000f35b61011d600435610375565b8060005260206000f35b610132600435610612565b8060005260206000f35b6101476004356105f2565b60006000f35b61015860043561037c565b84600160a060020a031660005283600160a060020a0316602052816040528060605260806000f35b61018d60043560006102d3565b60006000f35b61019e600435610632565b8060005260206000f35b6101b6600435602435610234565b60006000f35b6101ca600435602435610282565b60006000f35b6101db600435610513565b60006000f35b6101f2600435602435604435610495565b60006000f35b61020360043561048e565b80600160a060020a031660005260206000f35b610221600435610409565b80600160a060020a031660005260206000f35b33600160a060020a03166001600084815260200190815260200160002054600160a060020a0316146102655761027e565b8060016000848152602001908152602001600020819055505b5050565b33600160a060020a03166001600084815260200190815260200160002054600160a060020a0316146102b3576102cf565b8060016000848152602001908152602001600020600401819055505b5050565b33600160a060020a03166001600084815260200190815260200160002054600160a060020a03161461030457610320565b8060016000848152602001908152602001600020600201819055505b5050565b33600160a060020a03166001600084815260200190815260200160002054600160a060020a03161461035557610371565b8060016000848152602001908152602001600020600301819055505b5050565b6000919050565b60006000600060006000600160008781526020019081526020016000205494506001600087815260200190815260200160002060010154935060016000878152602001908152602001600020600201549250600160008781526020019081526020016000206003015491506001600087815260200190815260200160002060040154905091939590929450565b600060016000838152602001908152602001600020549050919050565b600060016000838152602001908152602001600020600101549050919050565b6001600082815260200190815260200160002054600160a060020a031660001461046f5761048b565b3360016000838152602001908152602001600020600101819055505b50565b6000919050565b33600160a060020a03166001600085815260200190815260200160002054600160a060020a0316146104c65761050e565b816001600085815260200190815260200160002060010181905550806104eb5761050d565b826000600084600160a060020a03168152602001908152602001600020819055505b5b505050565b33600160a060020a03166001600083815260200190815260200160002054600160a060020a031614610544576105ef565b80600060006001600085815260200190815260200160002060010154600160a060020a031681526020019081526020016000205414610582576105bb565b6000600060006001600085815260200190815260200160002060010154600160a060020a03168152602001908152602001600020819055505b6001600082815260200190815260200160002060008155600101600081556001016000815560010160008155600101600090555b50565b600060016000838152602001908152602001600020600201549050919050565b600060016000838152602001908152602001600020600301549050919050565b600060016000838152602001908152602001600020600401549050919050565b60006000600083600160a060020a0316815260200190815260200160002054905091905056"));
}
return s_ret;
}
// TODO: place Registry in here.
std::unique_ptr<BlockInfo> CanonBlockChain::s_genesis;
boost::shared_mutex CanonBlockChain::x_genesis;

Loading…
Cancel
Save