web3.eth.pendingTransactions is not a function
See https://github.com/iurimatias/embark-framework/issues/15 Also, minimalAmount was set too low for demo contract to launch.
This commit is contained in:
parent
e01a339756
commit
961dac4645
|
@ -9,14 +9,17 @@ setInterval(function() {
|
|||
miner_var = admin.miner;
|
||||
}
|
||||
|
||||
var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 1500000000000000000);
|
||||
var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 15000000000000000000);
|
||||
var pendingTransactions = function() {
|
||||
if (web3.eth.pendingTransactions === undefined) {
|
||||
return txpool.status.pending || txpool.status.queued;
|
||||
}
|
||||
else {
|
||||
else if (typeof web3.eth.pendingTransactions === "function") {
|
||||
return web3.eth.pendingTransactions().length > 0;
|
||||
}
|
||||
else {
|
||||
return web3.eth.getBlock('pending').transactions.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(!web3.eth.mining && (!minimalAmount || pendingTransactions())) {
|
||||
|
|
Loading…
Reference in New Issue