@Override public void parse(NulsByteBuffer byteBuffer) throws NulsException { this.roundIndex = byteBuffer.readUint32(); this.consensusMemberCount = byteBuffer.readUint16(); this.roundStartTime = byteBuffer.readUint48(); this.packingIndexOfRound = byteBuffer.readUint16(); } }
@Override public void parse(NulsByteBuffer buffer) throws NulsException { severPort = buffer.readUint16(); nodeIp = buffer.readString(); }
@Override public void parse(NulsByteBuffer buffer) throws NulsException { magicNumber = buffer.readUint32(); length = (int) buffer.readUint32(); xor = buffer.readByte(); arithmetic = buffer.readByte(); moduleId = (short) buffer.readUint16(); msgType = (short) buffer.readUint16(); }
@Override public void parse(NulsByteBuffer buffer) throws NulsException { magicNumber = buffer.readUint32(); port = buffer.readUint16(); ip = buffer.readString(); }
@Override public void parse(NulsByteBuffer byteBuffer) throws NulsException { this.roundIndex = byteBuffer.readUint32(); this.consensusMemberCount = byteBuffer.readUint16(); this.roundStartTime = byteBuffer.readUint48(); this.packingIndexOfRound = byteBuffer.readUint16(); if (!byteBuffer.isFinished()) { this.mainVersion = byteBuffer.readInt32(); this.currentVersion = byteBuffer.readInt32(); this.percent = byteBuffer.readUint16(); this.delay = byteBuffer.readUint32(); this.stateRoot = byteBuffer.readByLengthByte(); } }
@Override public void parse(NulsByteBuffer buffer) throws NulsException { handshakeType = buffer.readUint16(); severPort = buffer.readUint16(); bestBlockHeight = buffer.readUint32(); bestBlockHash = buffer.readHash(); networkTime = buffer.readUint48(); nodeIp = buffer.readString(); version = buffer.readString(); }
public static Transaction getInstance(NulsByteBuffer byteBuffer) throws Exception { int txType = byteBuffer.readUint16(); byteBuffer.setCursor(byteBuffer.getCursor() - SerializeUtils.sizeOfUint16()); Class<? extends Transaction> txClass = TYPE_TX_MAP.get(txType); if (null == txClass) { throw new NulsRuntimeException(KernelErrorCode.DATA_NOT_FOUND); } Transaction tx = byteBuffer.readNulsData(txClass.newInstance()); return tx; }
@Override public void parse(NulsByteBuffer byteBuffer) throws NulsException { this.txHash = byteBuffer.readHash(); this.blockHeight = byteBuffer.readUint32(); this.time = byteBuffer.readUint48(); this.addresses = byteBuffer.readByLengthByte(); this.txType = byteBuffer.readUint16(); this.status = byteBuffer.readByte(); }
@Override public void parse(NulsByteBuffer byteBuffer) throws NulsException { this.txHash = byteBuffer.readHash(); this.blockHeight = byteBuffer.readUint32(); this.time = byteBuffer.readUint48(); this.addresses = byteBuffer.readByLengthByte(); this.txType = byteBuffer.readUint16(); this.status = byteBuffer.readByte(); }
@Override public void parse(NulsByteBuffer byteBuffer) throws NulsException { type = byteBuffer.readUint16(); time = byteBuffer.readUint48(); this.remark = byteBuffer.readByLengthByte(); txData = this.parseTxData(byteBuffer); this.coinData = byteBuffer.readNulsData(new CoinData()); /*try { hash = NulsDigestData.calcDigestData(this.serializeForHash()); } catch (IOException e) { Log.error(e); }*/ transactionSignature = byteBuffer.readByLengthByte(); }