Browse Source

update the number of verification during the deployment process

cl-refactor
yann300 10 years ago
parent
commit
eae8de56d7
  1. 25
      mix/qml/BlockChain.qml
  2. 15
      mix/qml/DeployContractStep.qml
  3. 2
      mix/qml/DeploymentDialog.qml
  4. 12
      mix/qml/DeploymentWorker.qml
  5. 8
      mix/qml/RegisteringStep.qml

25
mix/qml/BlockChain.qml

@ -395,19 +395,22 @@ ColumnLayout {
text: qsTr("Add Tx")
onClicked:
{
var lastBlock = model.blocks[model.blocks.length - 1];
if (lastBlock.status === "mined")
if (model && model.blocks)
{
var newblock = projectModel.stateListModel.createEmptyBlock()
blockModel.appendBlock(newblock)
model.blocks.push(newblock);
}
var lastBlock = model.blocks[model.blocks.length - 1];
if (lastBlock.status === "mined")
{
var newblock = projectModel.stateListModel.createEmptyBlock()
blockModel.appendBlock(newblock)
model.blocks.push(newblock);
}
var item = TransactionHelper.defaultTransaction()
transactionDialog.stateAccounts = model.accounts
transactionDialog.execute = true
transactionDialog.editMode = false
transactionDialog.open(model.blocks[model.blocks.length - 1].transactions.length, model.blocks.length - 1, item)
var item = TransactionHelper.defaultTransaction()
transactionDialog.stateAccounts = model.accounts
transactionDialog.execute = true
transactionDialog.editMode = false
transactionDialog.open(model.blocks[model.blocks.length - 1].transactions.length, model.blocks.length - 1, item)
}
}
width: 100
height: 30

15
mix/qml/DeployContractStep.qml

@ -36,6 +36,19 @@ Rectangle {
accountsList.currentIndex = 0
}
verifyDeployedContract()
deployedAddresses.refresh()
worker.renewCtx()
worker.pooler.onTriggered.connect(function() {
if (root.visible)
verifyDeployedContract();
})
}
function verifyDeployedContract()
{
if (projectModel.deployBlockNumber !== -1)
{
worker.verifyHashes(projectModel.deploymentTrHashes, function (bn, trLost)
@ -43,8 +56,6 @@ Rectangle {
root.updateVerification(bn, trLost)
});
}
deployedAddresses.refresh()
worker.renewCtx()
}
function updateVerification(blockNumber, trLost)

2
mix/qml/DeploymentDialog.qml

@ -27,6 +27,7 @@ Dialog {
function close()
{
visible = false;
worker.pooler.running = false
}
function open()
@ -36,6 +37,7 @@ Dialog {
registerStep.visible = false
steps.init()
worker.renewCtx()
worker.pooler.running = true
visible = true;
}

12
mix/qml/DeploymentWorker.qml

@ -19,6 +19,7 @@ Item
property alias gasPriceInt: gasPriceInt
property variant balances: ({})
property variant accounts: []
property alias pooler: pooler
signal gasPriceLoaded()
function renewCtx()
@ -193,7 +194,8 @@ Item
id: codeModelGasEstimation
}
ClientModel {
ClientModel
{
id: clientModelGasEstimation
codeModel: codeModelGasEstimation
Component.onCompleted:
@ -202,6 +204,14 @@ Item
}
}
Timer
{
id: pooler
interval: 5000
repeat: true
running: false
}
Timer
{
id: poolLog

8
mix/qml/RegisteringStep.qml

@ -32,6 +32,14 @@ Rectangle {
visible = true
worker.pooler.onTriggered.connect(function() {
if (root.visible)
verifyRegistering();
})
}
function verifyRegistering()
{
verificationEthUrl.text = ""
if (projectModel.registerContentHashTrHash !== "" && projectModel.registerContentHashBlockNumber !== -1)
{

Loading…
Cancel
Save