Compensate for removal of gas price methods in poc-7
Block#getMinGasPrice and Blockchain#getGasPrice were removed in commit
aad53ba
, causing compilation failures in ethereumj-studio when building
against current master of ethereumj-core. As it is unclear whether these
methods have proper replacements, this commit simply replaces calls to
these now-missing methods with the value `42`. Obviously this is a
stopgap measure and should be addressed properly as soon as possible.
This commit is contained in:
parent
4a992fe93f
commit
c396eb11ea
|
@ -633,7 +633,7 @@ public class BlockChainTable extends JFrame implements ActionListener {
|
|||
Block block = blockchain.getBlockByNumber(blockNum);
|
||||
blockN.setText("" + block.getNumber());
|
||||
highlightText(blockN);
|
||||
minGasPrice.setText("" + block.getMinGasPrice());
|
||||
minGasPrice.setText("" + 42);
|
||||
highlightText(minGasPrice);
|
||||
gasLimit.setText("" + block.getGasLimit());
|
||||
highlightText(gasLimit);
|
||||
|
|
|
@ -303,8 +303,7 @@ class ContractSubmitDialog extends JDialog implements MessageAwareDialog {
|
|||
BigInteger currentBalance =
|
||||
UIEthereumManager.ethereum.getRepository().getBalance(account.getAddress());
|
||||
|
||||
long currGasPrice = UIEthereumManager.ethereum.getBlockchain().getGasPrice();
|
||||
BigInteger gasPrice = BigInteger.valueOf(currGasPrice);
|
||||
BigInteger gasPrice = BigInteger.valueOf(42);
|
||||
BigInteger gasInput = new BigInteger(this.gasInput.getText());
|
||||
|
||||
boolean canAfford = currentBalance.compareTo(gasPrice.multiply(gasInput)) >= 0;
|
||||
|
|
|
@ -117,7 +117,7 @@ class PayOutDialog extends JDialog implements MessageAwareDialog {
|
|||
|
||||
BigInteger nonce = account.getNonce();
|
||||
|
||||
byte[] gasPrice = BigInteger.valueOf(UIEthereumManager.ethereum.getBlockchain().getGasPrice()).toByteArray();
|
||||
byte[] gasPrice = BigInteger.valueOf(42).toByteArray();
|
||||
|
||||
Transaction tx = new Transaction(
|
||||
BigIntegers.asUnsignedByteArray(nonce),
|
||||
|
@ -201,7 +201,7 @@ class PayOutDialog extends JDialog implements MessageAwareDialog {
|
|||
// check if the tx is affordable
|
||||
BigInteger ammountValue = new BigInteger(amountText);
|
||||
BigInteger feeValue = new BigInteger(feeText);
|
||||
BigInteger gasPrice = BigInteger.valueOf(UIEthereumManager.ethereum.getBlockchain().getGasPrice());
|
||||
BigInteger gasPrice = BigInteger.valueOf(42);
|
||||
BigInteger currentBalance = account.getBalance();
|
||||
|
||||
boolean canAfford = gasPrice.multiply(feeValue).add(ammountValue).compareTo(currentBalance) != 1;
|
||||
|
|
Loading…
Reference in New Issue