use of org.aion.api.server.pb.TxWaitingMappingUpdate in project aion by aionnetwork.
the class HdlrZmq method getTxWait.
void getTxWait() {
TxWaitingMappingUpdate txWait = null;
try {
txWait = this.api.takeTxWait();
if (txWait.isDummy()) {
// shutdown process
return;
}
} catch (Exception e) {
// TODO Auto-generated catch block
LOGGER.error("zmq takeTxWait failed! ", e);
}
Map.Entry<ByteArrayWrapper, ByteArrayWrapper> entry = null;
if (txWait != null) {
entry = this.api.getMsgIdMapping().get(txWait.getTxHash());
}
if (entry != null) {
this.api.getPendingStatus().add(new TxPendingStatus(txWait.getTxHash(), entry.getValue(), entry.getKey(), txWait.getState(), txWait.getTxResult(), txWait.getTxReceipt().getError()));
// INCLUDED(3);
if (txWait.getState() == 1 || txWait.getState() == 2) {
this.api.getPendingReceipts().put(txWait.getTxHash(), txWait.getTxReceipt());
} else {
this.api.getPendingReceipts().remove(txWait.getTxHash());
this.api.getMsgIdMapping().remove(txWait.getTxHash());
}
}
}
use of org.aion.api.server.pb.TxWaitingMappingUpdate in project aion by aionnetwork.
the class HdlrZmq method shutdown.
public void shutdown() {
this.getTxStatusQueue().add(new TxPendingStatus(null, null, null, 0, null, ""));
this.api.getTxWait().add(new TxWaitingMappingUpdate(null, 0, null));
}
Aggregations