Transaction layer:
+ apply wire received transaction + resolve pending transaction saved by the GUI dialog
This commit is contained in:
parent
a0e379e54a
commit
24c3ed1d2c
|
@ -113,7 +113,8 @@ public class WorldManager {
|
|||
BigInteger gasDebit = tx.getTotalGasValueDebit();
|
||||
|
||||
// The coinbase get the gas cost
|
||||
repository.addBalance(coinbase, gasDebit);
|
||||
if (coinbase != null)
|
||||
repository.addBalance(coinbase, gasDebit);
|
||||
|
||||
byte[] contractAddress;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Timer;
|
|||
import java.util.TimerTask;
|
||||
|
||||
import org.ethereum.core.Block;
|
||||
import org.ethereum.core.Transaction;
|
||||
import org.ethereum.manager.MainData;
|
||||
import org.ethereum.manager.WorldManager;
|
||||
import org.ethereum.net.Command;
|
||||
|
@ -202,6 +203,10 @@ public class EthereumProtocolHandler extends ChannelInboundHandlerAdapter {
|
|||
RLPList rlpList = RLP.decode2(payload);
|
||||
TransactionsMessage transactionsMessage = new TransactionsMessage(rlpList);
|
||||
|
||||
List<Transaction> txList = transactionsMessage.getTransactions();
|
||||
for(Transaction tx : txList)
|
||||
WorldManager.getInstance().applyTransaction(tx, null);
|
||||
|
||||
logger.info(transactionsMessage.toString());
|
||||
if (peerListener != null) peerListener.console(transactionsMessage.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue