set etherbase on mining script

This commit is contained in:
Iuri Matias 2015-07-31 20:13:05 -04:00
parent dfdb917032
commit 28783e77bb
1 changed files with 10 additions and 9 deletions

View File

@ -1,14 +1,15 @@
var miner_var;
if (admin.miner === undefined) {
miner_var = miner;
}
else {
miner_var = admin.miner;
}
miner_var.setEtherbase(web3.eth.accounts[0]);
setInterval(function() { setInterval(function() {
var miner_var;
if (admin.miner === undefined) {
miner_var = miner;
}
else {
miner_var = admin.miner;
}
var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 15000000000000000000); var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 15000000000000000000);
var pendingTransactions = function() { var pendingTransactions = function() {
if (web3.eth.pendingTransactions === undefined || web3.eth.pendingTransactions === null) { if (web3.eth.pendingTransactions === undefined || web3.eth.pendingTransactions === null) {