Fixing invoke bug

This commit is contained in:
romanman 2014-06-27 01:19:26 +01:00
parent 7cf755f448
commit 6540331acb
2 changed files with 1 additions and 10 deletions

View File

@ -76,7 +76,6 @@ public class WorldManager {
public void applyTransaction(Transaction tx, byte[] coinbase) {
// TODO: refactor the wallet pending transactions to the world manager
if (blockChain != null)
blockChain.addWalletTransaction(tx);
@ -94,7 +93,6 @@ public class WorldManager {
return;
}
BigInteger nonce = repository.getNonce(senderAddress);
if (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {
if (stateLogger.isWarnEnabled())
@ -108,7 +106,6 @@ public class WorldManager {
// first of all debit the gas from the issuer
BigInteger gasDebit = tx.getTotalGasValueDebit();
gasDebit = gasDebit.multiply(new BigInteger(tx.getGasPrice()));
// The coinbase get the gas cost
repository.addBalance(coinbase, gasDebit);
@ -302,13 +299,9 @@ public class WorldManager {
}
public void applyTransactionList(List<Transaction> txList) {
}
public void applyBlock(Block block) {
// miner reward
if (repository.getAccountState(block.getCoinbase()) == null )
repository.createAccount(block.getCoinbase());

View File

@ -48,7 +48,7 @@ public class ProgramInvokeFactory {
byte[] gas = tx.getGasLimit();
/*** CALLVALUE op ***/
byte[] callValue = tx.getValue();
byte[] callValue = tx.getValue() == null ? new byte[]{0} : tx.getValue();
/*** CALLDATALOAD op ***/
@ -76,8 +76,6 @@ public class ProgramInvokeFactory {
long gaslimit = lastBlock.getGasLimit();
repository.startTracking();
if (logger.isInfoEnabled()){
logger.info("Program invocation: \n" +
"address={}\n" +