-
Hans Moog authored
* Feat: started to merge changes * Refactor: moved parameter package to be a plugin (same with logger) * Feat: first compiling version of new ontologoies merge * Feat: ported additional plugins * Feat: transaction get solid now * Refactor: reverted some previous changes from debugging * Feat: added a banner module for the cli interface * Feat: added a plugin for the port checks * Feat: fixed some bugs * Refactor: reverted some changes * Feat: reworked TransactionParser to use Errors * Feat: TransactionParser uses Peer * Feat: started to rework broadCastData webapi call * Feat: refactored some plugins * Fix: fixed test of tangle * Refactor: changed tangle package in graph plugin * Refactor: uncommented broken code * Fix: fixed broken method signature in gossip test * Feat: started adding value tangle * Feat: adjusted to new hive.go * Feat: upgraded hive.go * Clean up PortCheck plugin and make it standalone #259 (#271) Co-authored-by:
Hans Moog <hm@mkjc.net> Co-authored-by:
Jonas Theis <mail@jonastheis.de>
Hans Moog authored* Feat: started to merge changes * Refactor: moved parameter package to be a plugin (same with logger) * Feat: first compiling version of new ontologoies merge * Feat: ported additional plugins * Feat: transaction get solid now * Refactor: reverted some previous changes from debugging * Feat: added a banner module for the cli interface * Feat: added a plugin for the port checks * Feat: fixed some bugs * Refactor: reverted some changes * Feat: reworked TransactionParser to use Errors * Feat: TransactionParser uses Peer * Feat: started to rework broadCastData webapi call * Feat: refactored some plugins * Fix: fixed test of tangle * Refactor: changed tangle package in graph plugin * Refactor: uncommented broken code * Fix: fixed broken method signature in gossip test * Feat: started adding value tangle * Feat: adjusted to new hive.go * Feat: upgraded hive.go * Clean up PortCheck plugin and make it standalone #259 (#271) Co-authored-by:
Hans Moog <hm@mkjc.net> Co-authored-by:
Jonas Theis <mail@jonastheis.de>
marshalutil.uint64.go 574 B
package marshalutil
import "encoding/binary"
const UINT64_SIZE = 8
func (util *MarshalUtil) WriteUint64(value uint64) {
writeEndOffset := util.expandWriteCapacity(UINT64_SIZE)
binary.LittleEndian.PutUint64(util.bytes[util.writeOffset:writeEndOffset], value)
util.WriteSeek(writeEndOffset)
}
func (util *MarshalUtil) ReadUint64() (uint64, error) {
readEndOffset, err := util.checkReadCapacity(UINT64_SIZE)
if err != nil {
return 0, err
}
defer util.ReadSeek(readEndOffset)
return binary.LittleEndian.Uint64(util.bytes[util.readOffset:readEndOffset]), nil
}