package
1.0.1
Repository: https://github.com/zoobc/zoobc-core.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
CalculateParticipationScore to calculate score change of node.
No description provided by the author
ConvertBytesToUint16 takes array of bytes and return the uint16 representation of the given bytes.
ConvertBytesToUint32 takes array of bytes and return the uint32 representation of the given bytes.
ConvertBytesToUint64 takes array of bytes and return the uint64 representation of the given bytes.
ConvertIntToBytes takes the int decimal number and return the byte array representation of the given number.
ConvertStringToBytes takes a string and return the byte array representation of the given string.
ConvertUint16ToBytes takes the uint16 decimal number and return the byte array representation of the given number.
ConvertUint32ToBytes takes the uint32 decimal number and return the byte array representation of the given number.
ConvertUint64ToBytes takes the uint64 decimal number and return the byte array representation of the given number.
FeePerByteTransaction use to calculate fee of each bytes transaction.
GenerateRandomBytes returns securely generated random bytes.
GetBlockByHeight get block at the height provided TODO: this should be used by services instead of blockService.GetLastBlock.
GetBlockByHeight get block at the height provided & returned in cache format.
GetBlockByID get block at the ID provided.
GetBlockByID get block at the ID provided & returned in cache format.
GetBlockByte generate value for `Bytes` field if not assigned yet return .`Bytes` if value assigned TODO: Abstract this method in BlockCoreService or ChainType to decouple business logic from block type.
GetBlockHash return the block's bytes hash.
GetBlockSmithsPubKeysBatchInRange get a batch of blocksmiths public keys ( for making linked receipts selection and validation more efficient).
GetChecksumByte Calculate a checksum byte from a collection of bytes checksum 255 = 255, 256 = 0, 257 = 1 and so on.
No description provided by the author
GetFastRandom generates a int64 random number.
GetFastRandomSeed generates a new randome seed, a mnemonic that can be used to derive a private key.
GetGoRoutineStats info about concurrent processes spawned by main process.
GetHwStats info about system cpu/mem usage.
GetLastBlock TODO: this should be used by services instead of blockService.GetLastBlock.
No description provided by the author
GetNextStep returns the next step of an interval, given current one and the interval.
GetProofOfOriginBytes serialize ProofOfOrigin struct into bytes.
GetProofOfOwnershipBytes serialize ProofOfOwnership struct into bytes.
GetProofOfOwnershipMessageBytes serialize ProofOfOwnershipMessage struct into bytes.
GetProofOfOwnershipSize returns size in bytes of a proof of ownership message.
GetRootPath return root of project.
GetSecurePositiveRandom generates a int64 secure random TODO: implement the real function to generate a secure random.
GetSecureRandomSeed generates a new random seed, a mnemonic that can be used to derive a private key.
GetSpinePublicKeyBytes convert a model.SpinePublicKey to []byte.
InitLogger is function that should be implemented with interceptor.
No description provided by the author
IsBytesEmpty returns check result whether the bytes are empty.
LoadConfig must be called at first time while start the app */.
MaxInt64 returns the largest int64 number supplied.
MaxUint32 returns the largest uint32 number supplied.
MinInt64 returns the smallest int64 number supplied.
MinUint32 returns the smallest uint32 number supplied.
No description provided by the author
No description provided by the author
NewScheduler return new scheduler instance.
No description provided by the author
ParseProofOfOwnershipBytes parse a byte array into a ProofOfOwnership struct (message + signature) poownBytes if true returns size of message + signature.
ParseProofOfOwnershipMessageBytes parse a byte array into a ProofOfOwnershipMessage struct (only the message, no signature).
PopulateBlockData add transactions and receipts to the block.
PrepareEscrowObjectForAction prepares the escrow object to be processed by actions.
ReadTransactionBytes get a slice containing the next nBytes from the buffer.
RenderByteArrayAsString renders a byte array in the form of a string that can easily be copy/pasted into (golang) code, eg.
No description provided by the author
SimpleQueueAddElement add an element at the rear of the queue (last element of slice) and pop the one in front (first element of slice).
SortByteArrays sort a slices array.
SplitByteSliceByChunkSize split a byte slice into multiple chunks of equal size, beside the last chunk which could be shorter than the others, if the original slice's length is not multiple of chunkSize.
ValidateBasicEscrow performs basic validation on the escrow.
ValidateIP4 validates format of ipv4 */.
No description provided by the author

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author