Documentation ¶
Index ¶
- Constants
- func BigIntLessThan(a, b *big.Int) bool
- func BigIntToString(b *big.Int) string
- func ErrMissingRequiredArg(value string) error
- func ErrPayloadTooBig(bodyLength, acceptedLength uint) error
- func ErrPeerHangUp(err error) error
- func ErrSocketIOStartFailed(socketType string) error
- func ErrSocketRequestTimedOut(addr string, nonce uint32) error
- func ErrUndefinedSocketType(socketType string) error
- func ErrUnexpected(err error) error
- func Int64ToBytes(i int64) []byte
- func RandBigInt() *big.Int
- type Code
- type Codec
- type Error
- func EmptyTransactionErr() Error
- func ErrAddAccountAmount(err error) Error
- func ErrAddPoolAmount(name string, err error) Error
- func ErrAlreadyExists() Error
- func ErrAlreadyPaused() Error
- func ErrAppHash(err error) Error
- func ErrCommitContext(err error) Error
- func ErrDecodeMessage() Error
- func ErrDelete(err error) Error
- func ErrDuplicateSavePoint() Error
- func ErrDuplicateTransaction() Error
- func ErrEmptyAccount() Error
- func ErrEmptyAddress() Error
- func ErrEmptyAmount() Error
- func ErrEmptyHash() Error
- func ErrEmptyName() Error
- func ErrEmptyNetworkID() Error
- func ErrEmptyNonce() Error
- func ErrEmptyParamKey() Error
- func ErrEmptyParamValue() Error
- func ErrEmptyProposer() Error
- func ErrEmptyPublicKey() Error
- func ErrEmptyRelayChain() Error
- func ErrEmptyRelayChains() Error
- func ErrEmptySavePoints() Error
- func ErrEmptySignature() Error
- func ErrEmptyTimestamp() Error
- func ErrEqualVotes() Error
- func ErrExportState(err error) Error
- func ErrGetAccountAmount(err error) Error
- func ErrGetAllAccounts(err error) Error
- func ErrGetAllApps(err error) Error
- func ErrGetAllFishermen(err error) Error
- func ErrGetAllParams(err error) Error
- func ErrGetAllPools(err error) Error
- func ErrGetAllServiceNodes(err error) Error
- func ErrGetAllValidators(err error) Error
- func ErrGetAppHash(err error) Error
- func ErrGetBlockHash(err error) Error
- func ErrGetExists(err error) Error
- func ErrGetLatestHeight(err error) Error
- func ErrGetMissedBlocks(err error) Error
- func ErrGetOutputAddress(operator []byte, err error) Error
- func ErrGetParam(paramName string, err error) Error
- func ErrGetPauseHeight(err error) Error
- func ErrGetPoolAmount(name string, err error) Error
- func ErrGetReadyToUnstake(err error) Error
- func ErrGetServiceNodeCount(chain string, height int64, err error) Error
- func ErrGetServiceNodesPerSessionAt(height int64, err error) Error
- func ErrGetStatus(err error) Error
- func ErrGetValidatorStakedTokens(err error) Error
- func ErrHexDecodeFromString(err error) Error
- func ErrInitParams(err error) Error
- func ErrInsert(err error) Error
- func ErrInsufficientAmountError() Error
- func ErrInterfaceConversion(got interface{}, expected interface{}) Error
- func ErrInvalidAddressLen(err error) Error
- func ErrInvalidAmount() Error
- func ErrInvalidBlockHeight() Error
- func ErrInvalidEvidenceType() Error
- func ErrInvalidHashLength(err error) Error
- func ErrInvalidNonce() Error
- func ErrInvalidParamValue(got, expected interface{}) Error
- func ErrInvalidProposerCutPercentage() Error
- func ErrInvalidPublicKeylen(err error) Error
- func ErrInvalidRelayChainLength(got, expected int) Error
- func ErrInvalidServiceUrl(reason string) Error
- func ErrInvalidSigner() Error
- func ErrInvalidStatus(got, expected int) Error
- func ErrInvalidTransactionCount() Error
- func ErrMaxChains(maxChains int) Error
- func ErrMaxEvidenceAge() Error
- func ErrMinimumStake() Error
- func ErrNegativeAmountError() Error
- func ErrNewAddressFromBytes(err error) Error
- func ErrNewFeeFromString(fee string) Error
- func ErrNewPersistenceContext(err error) Error
- func ErrNewPublicKeyFromBytes(err error) Error
- func ErrNewSavePoint(err error) Error
- func ErrNilOutputAddress() Error
- func ErrNilPool() Error
- func ErrNilQuorumCertificate() Error
- func ErrNotExists() Error
- func ErrNotPaused() Error
- func ErrNotReadyToUnpause() Error
- func ErrProtoFromAny(err error) Error
- func ErrProtoMarshal(err error) Error
- func ErrProtoNewAny(err error) Error
- func ErrProtoUnmarshal(err error) Error
- func ErrReleaseContext(err error) Error
- func ErrResetContext(err error) Error
- func ErrRollbackSavePoint(err error) Error
- func ErrSavePointNotFound() Error
- func ErrSetAccountAmount(err error) Error
- func ErrSetMissedBlocks(err error) Error
- func ErrSetPauseHeight(err error) Error
- func ErrSetPool(name string, err error) Error
- func ErrSetPoolAmount(name string, err error) Error
- func ErrSetStatusPausedBefore(err error, beforeHeight int64) Error
- func ErrSetUnstakingHeightAndStatus(err error) Error
- func ErrSetValidatorStakedTokens(err error) Error
- func ErrSignatureVerificationFailed() Error
- func ErrStringToBigInt() Error
- func ErrSubPoolAmount(name string, err error) Error
- func ErrTransactionAlreadyCommitted() Error
- func ErrTransactionSign(err error) Error
- func ErrUnauthorizedParamChange(owner []byte) Error
- func ErrUnequalHeights() Error
- func ErrUnequalPublicKeys() Error
- func ErrUnequalRounds() Error
- func ErrUnequalVoteTypes() Error
- func ErrUnknownMessage(msg interface{}) Error
- func ErrUnknownParam(paramName string) Error
- func ErrUnmarshalTransaction(err error) Error
- func ErrUpdateParam(err error) Error
- func NewError(code Code, msg string) Error
- func StringToBigInt(s string) (*big.Int, Error)
- type FIFOMempool
- func (f *FIFOMempool) AddTransaction(tx []byte) Error
- func (f *FIFOMempool) Clear()
- func (f *FIFOMempool) Contains(hash string) bool
- func (f *FIFOMempool) DeleteTransaction(tx []byte) Error
- func (f *FIFOMempool) PopTransaction() ([]byte, Error)
- func (f *FIFOMempool) Size() int
- func (f *FIFOMempool) TxsBytes() int
- type Mempool
- type ProtoCodec
- type StdErr
- type ValMap
- type Validator
Constants ¶
View Source
const ( CodeEmptyTransactionError Code = 2 CodeNewAddressFromBytesError Code = 9 CodeHexDecodeFromStringError Code = 11 CodeInvalidHashLengthError Code = 12 CodeEmptyNetworkIDError Code = 13 CodeEmptyProposerError Code = 14 CodeEmptyTimestampError Code = 15 CodeInvalidTransactionCountError Code = 16 CodeEmptyAccountError Code = 17 CodeNilPoolError Code = 18 CodeEmptyNameError Code = 19 CodeEmptyAddressError Code = 20 CodeInvalidAddressLenError Code = 21 CodeInvalidAmountError Code = 23 CodeProtoMarshalError Code = 25 CodeProtoUnmarshalError Code = 26 CodeProtoNewAnyError Code = 27 CodeDuplicateTransactionError Code = 35 CodeGetAllValidatorsError Code = 37 CodeStringToBigIntError Code = 40 CodeUpdateParamError Code = 88 CodeInitParamsError Code = 96 CodeGetAllFishermenError Code = 97 CodeGetAllServiceNodesError Code = 98 CodeGetAllAppsError Code = 99 CodeGetAllPoolsError Code = 107 CodeGetAllAccountsError Code = 108 CodeGetAllParamsError Code = 109 CodeInsufficientAmountError Code = 41 CodeNegativeAmountError Code = 118 CodeNilQuorumCertificateError Code = 119 EmptyTransactionError = "the transaction is empty" StringToBigIntError = "an error occurred converting the string primitive to big.Int, the conversion was unsuccessful with base 10" GetAllValidatorsError = "an error occurred getting all validators from the state" InvalidAmountError = "the amount field is invalid; cannot be converted to big.Int" InvalidAddressLenError = "the length of the address is not valid" EmptyAddressError = "the address field is empty" EmptyNameError = "the name field is empty" NilPoolError = "the pool is nil" EmptyAccountError = "the account is nil" NewAddressFromBytesError = "unable to convert the raw bytes to a valid address" InvalidTransactionCountError = "the total transactions are less than the block transactions" EmptyTimestampError = "the timestamp field is empty" EmptyProposerError = "the proposer field is empty" EmptyNetworkIDError = "the network id field is empty" InvalidHashLengthError = "the length of the hash is not the correct size" NilQuorumCertificateError = "the quorum certificate is nil" HexDecodeFromStringError = "an error occurred decoding the string into hex bytes" ProtoMarshalError = "an error occurred marshalling the structure in protobuf" ProtoUnmarshalError = "an error occurred unmarshalling the structure in protobuf" ProtoNewAnyError = "an error occurred creating the protobuf any" UpdateParamError = "an error occurred updating the parameter" InitParamsError = "an error occurred initializing the params in genesis" GetAllFishermenError = "an error occurred getting all of the fishermen¬" GetAllAppsError = "an error occurred getting all of the apps" GetAllServiceNodesError = "an error occurred getting all of the service nodes" GetAllPoolsError = "an error occurred getting all of the pools" GetAllAccountsError = "an error occurred getting all of the accounts" GetAllParamsError = "an error occurred getting all of the params" DuplicateTransactionError = "the transaction is already found in the mempool" InsufficientAmountError = "the account has insufficient funds to complete the operation" NegativeAmountError = "the amount is negative" )
View Source
const ( CodeOK Code = 0 CodeInvalidSignerError Code = 3 CodeDecodeMessageError Code = 4 CodeUnmarshalTransaction Code = 5 CodeUnknownMessageError Code = 6 CodeAppHashError Code = 7 CodeNewPublicKeyFromBytesError Code = 8 CodeSignatureVerificationFailedError Code = 10 CodeInvalidNonceError Code = 22 CodeProtoFromAnyError Code = 28 CodeNewFeeFromStringError Code = 29 CodeEmptyNonceError Code = 30 CodeEmptyPublicKeyError Code = 31 CodeEmptySignatureError Code = 32 CodeTransactionSignError Code = 36 CodeInterfaceConversionError Code = 38 CodeGetAccountAmountError Code = 39 CodeAddAccountAmountError Code = 42 CodeSetAccountError Code = 43 CodeGetParamError Code = 44 CodeMinimumStakeError Code = 45 CodeEmptyRelayChainError Code = 46 CodeEmptyRelayChainsError Code = 47 CodeInvalidRelayChainLengthError Code = 48 CodeNilOutputAddress Code = 49 CodeInvalidPublicKeyLenError Code = 50 CodeEmptyAmountError Code = 51 CodeMaxChainsError Code = 52 CodeInsertError Code = 53 CodeInvalidStatusError Code = 54 CodeAddPoolAmountError Code = 55 CodeSubPoolAmountError Code = 56 CodeGetStatusError Code = 57 CodeSetUnstakingHeightAndStatusError Code = 58 CodeGetReadyToUnstakeError Code = 59 CodeAlreadyExistsError Code = 60 CodeGetExistsError Code = 61 CodeGetLatestHeightError Code = 62 CodeDeleteError Code = 63 CodeGetPauseHeightError Code = 64 CodeAlreadyPausedError Code = 65 CodeSetPauseHeightError Code = 66 CodeNotPausedError Code = 67 CodeNotReadyToUnpauseError Code = 68 CodeSetStatusPausedBeforeError Code = 69 CodeInvalidServiceUrlError Code = 70 CodeNotExistsError Code = 71 CodeGetMissedBlocksError Code = 72 CodeEmptyHashError Code = 73 CodeInvalidBlockheightError Code = 74 CodeUnequalPublicKeysError Code = 75 CodeUnequalVoteTypesError Code = 76 CodeEqualVotesError Code = 77 CodeUnequalRoundsError Code = 78 CodeMaxEvidenceAgeError Code = 79 CodeGetValidatorStakedTokensError Code = 80 CodeSetValidatorStakedTokensError Code = 81 CodeSetPoolAmountError Code = 82 CodeGetPoolAmountError Code = 83 CodeInvalidProposerCutPercentageError Code = 84 CodeUnknownParamError Code = 85 CodeInvalidParamValueError Code = 87 CodeGetServiceNodesPerSessionAtError Code = 89 CodeGetBlockHashError Code = 90 CodeGetServiceNodeCountError Code = 91 CodeEmptyParamKeyError Code = 92 CodeEmptyParamValueError Code = 93 CodeGetOutputAddressError Code = 94 CodeTransactionAlreadyCommittedError Code = 95 CodeNewPersistenceContextError Code = 100 CodeGetAppHashError Code = 101 CodeNewSavePointError Code = 102 CodeRollbackSavePointError Code = 103 CodeResetContextError Code = 104 CodeCommitContextError Code = 105 CodeReleaseContextError Code = 106 CodeSetPoolError Code = 110 CodeDuplicateSavePointError Code = 111 CodeSavePointNotFoundError Code = 112 CodeEmptySavePointsError Code = 113 CodeInvalidEvidenceTypeError Code = 114 CodeExportStateError Code = 115 CodeUnequalHeightsError Code = 116 CodeSetMissedBlocksError Code = 117 CodeMissingRequiredArgError Code = 118 // TODO(derrandz): revisit whether this is needed CodeSocketRequestTimedOutError Code = 119 CodeUndefinedSocketTypeError Code = 120 CodePeerHangUpError Code = 121 CodeUnexpectedSocketError Code = 122 CodePayloadTooBigError Code = 123 CodeSocketIOStartFailedError Code = 124 GetValidatorStakedTokensError = "an error occurred getting the validator staked tokens" SetValidatorStakedTokensError = "an error occurred setting the validator staked tokens" EqualVotesError = "the votes are identical and not equivocating" UnequalRoundsError = "the round numbers are not equal" UnequalVoteTypesError = "the vote types are not equal" UnequalPublicKeysError = "the two public keys are not equal" GetMissedBlocksError = "an error occurred getting the missed blocks field" DecodeMessageError = "unable to decode the message" NotExistsError = "the actor does not exist in the state" InvalidServiceUrlError = "the service url is not valid" NotReadyToUnpauseError = "the actor isn't ready to unpause as the minimum number of blocks hasn't passed since pausing" NotPausedError = "the actor is not paused" SetPauseHeightError = "an error occurred setting the pause height" AlreadyPausedError = "the actor is already paused" GetPauseHeightError = "an error occurred getting the pause height" UnmarshalTransactionError = "an error occurred decoding the transaction" DeleteError = "an error occurred when deleting the actor" AlreadyExistsError = "the actor already exists in the state" GetExistsError = "an error occurred when checking if already exists" GetReadyToUnstakeError = "an error occurred getting the 'ready to unstake' group" GetLatestHeightError = "an error occurred getting the latest height" SetUnstakingHeightAndStatus = "an error occurred setting the unstaking height and status" GetStatusError = "an error occurred getting the staking status" InvalidStatusError = "the staking status is not valid" InsertError = "an error occurred inserting into persistence" MaxChainsError = "the amount chains exceeds the maximum value" InvalidPublicKeyLenError = "the public key length is not valid" EmptyAmountError = "the amount field is empty" NilOutputAddressError = "the output address is nil" InvalidRelayChainLengthError = "the relay chain id length is invalid" EmptyRelayChainError = "the relay chain id is empty" EmptyRelayChainsError = "the relay chains are nil or empty" MinimumStakeError = "an error occurred because the amount specified is less than the minimum stake" GetParamError = "an error occurred getting the parameter" SetAccountError = "an error occurred setting the account" AddAccountAmountError = "an error occurred adding the amount to the account balance" AddPoolAmountError = "an error occurred adding to the pool" SubPoolAmountError = "an error occurred subtracting from the pool" SetPoolAmountError = "an error occurred setting the pool amount" GetPoolAmountError = "an error occurred getting the pool amount" InvalidSignerError = "the signer of the message is not a proper candidate" GetAccountAmountError = "an error occurred getting the account amount" UnknownMessageError = "the message type is unrecognized" AppHashError = "an error occurred generating the apphash" InvalidNonceError = "the nonce field is invalid; cannot be converted to big.Int" NewPublicKeyFromBytesError = "unable to convert the raw bytes to a valid public key" SignatureVerificationFailedError = "the public key / signature combination is not valid for the msg" ProtoFromAnyError = "an error occurred getting the structure from the protobuf any" NewFeeFromStringError = "the fee string is unable to be converted to a valid base 10 number" EmptyNonceError = "the nonce in the transaction is empty" EmptyPublicKeyError = "the public key field is empty" EmptySignatureError = "the signature field is empty" TransactionSignError = "an error occurred signing the transaction" InterfaceConversionError = "an error occurred converting the interface to an expected type: " SetStatusPausedBeforeError = "an error occurred setting the actor status that were paused before" EmptyHashError = "the hash is empty" InvalidBlockHeightError = "the block height field is not valid" MaxEvidenceAgeError = "the evidence is too old to be processed" InvalidProposerCutPercentageError = "the proposer cut percentage is larger than 100" UnknownParamError = "the param name is not found in the acl" InvalidParamValueError = "the param value is not the expected type" GetBlockHashError = "an error occurred getting the block hash" GetServiceNodesPerSessionAtError = "an error occurred getting the service nodes per session for height" GetServiceNodeCountError = "an error occurred getting the service node count" EmptyParamKeyError = "the parameter key is empty" EmptyParamValueError = "the parameter value is empty" GetOutputAddressError = "an error occurred getting the output address using operator" TransactionAlreadyCommittedError = "the transaction is already committed" NewSavePointError = "an error occurred creating the save point" RollbackSavePointError = "an error occurred rolling back to save point" NewPersistenceContextError = "an error occurred creating the persistence context" GetAppHashError = "an error occurred getting the apphash" ResetContextError = "an error occurred resetting the context" CommitContextError = "an error occurred committing the context" ReleaseContextError = "an error occurred releasing the context" SetPoolError = "an error occurred setting the pool" DuplicateSavePointError = "the save point is duplicated" SavePointNotFoundError = "the save point is not found" EmptySavePointsError = "the save points list in context is empty" InvalidEvidenceTypeError = "the evidence type is not valid" ExportStateError = "an error occurred exporting the state" UnequalHeightsError = "the heights are not equal" SetMissedBlocksError = "an error occurred setting missed blocks" MissingRequiredArgError = "socket error: missing required argument." SocketRequestTimedOutError = "socket error: request timed out while waiting on ACK." UndefinedSocketTypeError = "socket error: undefined given socket type." PeerHangUpError = "socket error: Peer hang up." UnexpectedSocketError = "socket error: Unexpected peer error." PayloadTooBigError = "socket error: payload size is too big. " SocketIOStartFailedError = "socket error: failed to start socket reading/writing (io)" )
View Source
const ( ZeroInt = 0 HeightNotUsed = 0 // TODO (Andrew) update design, could use -1 EmptyString = "" )
Variables ¶
This section is empty.
Functions ¶
func BigIntLessThan ¶
func BigIntToString ¶
func ErrMissingRequiredArg ¶
func ErrPayloadTooBig ¶
func ErrPeerHangUp ¶
func ErrSocketIOStartFailed ¶
func ErrUndefinedSocketType ¶
func ErrUnexpected ¶
func Int64ToBytes ¶
func RandBigInt ¶
Types ¶
type Codec ¶
type Error ¶
func EmptyTransactionErr ¶
func EmptyTransactionErr() Error
func ErrAddAccountAmount ¶
func ErrAddPoolAmount ¶
func ErrAlreadyExists ¶
func ErrAlreadyExists() Error
func ErrAlreadyPaused ¶
func ErrAlreadyPaused() Error
func ErrAppHash ¶
func ErrCommitContext ¶
func ErrDecodeMessage ¶
func ErrDecodeMessage() Error
func ErrDuplicateSavePoint ¶
func ErrDuplicateSavePoint() Error
func ErrDuplicateTransaction ¶
func ErrDuplicateTransaction() Error
func ErrEmptyAccount ¶
func ErrEmptyAccount() Error
func ErrEmptyAddress ¶
func ErrEmptyAddress() Error
func ErrEmptyAmount ¶
func ErrEmptyAmount() Error
func ErrEmptyHash ¶
func ErrEmptyHash() Error
func ErrEmptyName ¶
func ErrEmptyName() Error
func ErrEmptyNetworkID ¶
func ErrEmptyNetworkID() Error
func ErrEmptyNonce ¶
func ErrEmptyNonce() Error
func ErrEmptyParamKey ¶
func ErrEmptyParamKey() Error
func ErrEmptyParamValue ¶
func ErrEmptyParamValue() Error
func ErrEmptyProposer ¶
func ErrEmptyProposer() Error
func ErrEmptyPublicKey ¶
func ErrEmptyPublicKey() Error
func ErrEmptyRelayChain ¶
func ErrEmptyRelayChain() Error
func ErrEmptyRelayChains ¶
func ErrEmptyRelayChains() Error
func ErrEmptySavePoints ¶
func ErrEmptySavePoints() Error
func ErrEmptySignature ¶
func ErrEmptySignature() Error
func ErrEmptyTimestamp ¶
func ErrEmptyTimestamp() Error
func ErrEqualVotes ¶
func ErrEqualVotes() Error
func ErrExportState ¶
func ErrGetAccountAmount ¶
func ErrGetAllAccounts ¶
func ErrGetAllApps ¶
func ErrGetAllFishermen ¶
func ErrGetAllParams ¶
func ErrGetAllPools ¶
func ErrGetAllServiceNodes ¶
func ErrGetAllValidators ¶
func ErrGetAppHash ¶
func ErrGetBlockHash ¶
func ErrGetExists ¶
func ErrGetLatestHeight ¶
func ErrGetMissedBlocks ¶
func ErrGetOutputAddress ¶
func ErrGetParam ¶
func ErrGetPauseHeight ¶
func ErrGetPoolAmount ¶
func ErrGetReadyToUnstake ¶
func ErrGetServiceNodeCount ¶
func ErrGetStatus ¶
func ErrHexDecodeFromString ¶
func ErrInitParams ¶
func ErrInsufficientAmountError ¶
func ErrInsufficientAmountError() Error
func ErrInterfaceConversion ¶
func ErrInterfaceConversion(got interface{}, expected interface{}) Error
func ErrInvalidAddressLen ¶
func ErrInvalidAmount ¶
func ErrInvalidAmount() Error
func ErrInvalidBlockHeight ¶
func ErrInvalidBlockHeight() Error
func ErrInvalidEvidenceType ¶
func ErrInvalidEvidenceType() Error
func ErrInvalidHashLength ¶
func ErrInvalidNonce ¶
func ErrInvalidNonce() Error
func ErrInvalidParamValue ¶
func ErrInvalidParamValue(got, expected interface{}) Error
func ErrInvalidProposerCutPercentage ¶
func ErrInvalidProposerCutPercentage() Error
func ErrInvalidPublicKeylen ¶
func ErrInvalidServiceUrl ¶
func ErrInvalidSigner ¶
func ErrInvalidSigner() Error
func ErrInvalidStatus ¶
func ErrInvalidTransactionCount ¶
func ErrInvalidTransactionCount() Error
func ErrMaxChains ¶
func ErrMaxEvidenceAge ¶
func ErrMaxEvidenceAge() Error
func ErrMinimumStake ¶
func ErrMinimumStake() Error
func ErrNegativeAmountError ¶
func ErrNegativeAmountError() Error
func ErrNewAddressFromBytes ¶
func ErrNewFeeFromString ¶
func ErrNewSavePoint ¶
func ErrNilOutputAddress ¶
func ErrNilOutputAddress() Error
func ErrNilPool ¶
func ErrNilPool() Error
func ErrNilQuorumCertificate ¶
func ErrNilQuorumCertificate() Error
func ErrNotExists ¶
func ErrNotExists() Error
func ErrNotPaused ¶
func ErrNotPaused() Error
func ErrNotReadyToUnpause ¶
func ErrNotReadyToUnpause() Error
func ErrProtoFromAny ¶
func ErrProtoMarshal ¶
func ErrProtoNewAny ¶
func ErrProtoUnmarshal ¶
func ErrReleaseContext ¶
func ErrResetContext ¶
func ErrRollbackSavePoint ¶
func ErrSavePointNotFound ¶
func ErrSavePointNotFound() Error
func ErrSetAccountAmount ¶
func ErrSetMissedBlocks ¶
func ErrSetPauseHeight ¶
func ErrSetPool ¶
func ErrSetPoolAmount ¶
func ErrSignatureVerificationFailed ¶
func ErrSignatureVerificationFailed() Error
func ErrStringToBigInt ¶
func ErrStringToBigInt() Error
func ErrSubPoolAmount ¶
func ErrTransactionAlreadyCommitted ¶
func ErrTransactionAlreadyCommitted() Error
func ErrTransactionSign ¶
func ErrUnequalHeights ¶
func ErrUnequalHeights() Error
func ErrUnequalPublicKeys ¶
func ErrUnequalPublicKeys() Error
func ErrUnequalRounds ¶
func ErrUnequalRounds() Error
func ErrUnequalVoteTypes ¶
func ErrUnequalVoteTypes() Error
func ErrUnknownMessage ¶
func ErrUnknownMessage(msg interface{}) Error
func ErrUnknownParam ¶
func ErrUnmarshalTransaction ¶
func ErrUpdateParam ¶
type FIFOMempool ¶
type FIFOMempool struct {
// contains filtered or unexported fields
}
func (*FIFOMempool) AddTransaction ¶
func (f *FIFOMempool) AddTransaction(tx []byte) Error
func (*FIFOMempool) Clear ¶
func (f *FIFOMempool) Clear()
func (*FIFOMempool) Contains ¶
func (f *FIFOMempool) Contains(hash string) bool
func (*FIFOMempool) DeleteTransaction ¶
func (f *FIFOMempool) DeleteTransaction(tx []byte) Error
func (*FIFOMempool) PopTransaction ¶
func (f *FIFOMempool) PopTransaction() ([]byte, Error)
func (*FIFOMempool) Size ¶
func (f *FIFOMempool) Size() int
func (*FIFOMempool) TxsBytes ¶
func (f *FIFOMempool) TxsBytes() int
type Mempool ¶
type Mempool interface { Contains(hash string) bool AddTransaction(tx []byte) Error DeleteTransaction(tx []byte) Error Clear() Size() int TxsBytes() int PopTransaction() (tx []byte, err Error) }
func NewMempool ¶
type ProtoCodec ¶
type ProtoCodec struct{}
type ValMap ¶
The key is a hex encoded representation of the validator byte address. TODO(discuss): Should there be a type for a stringified version of `Address`?
func ValidatorListToMap ¶
Mapping a validator from ID to the struct can make different parts of the consensus business logic easier & faster.
type Validator ¶
type Validator struct { Address cryptoPocket.Address `json:"address"` PublicKey cryptoPocket.Ed25519PublicKey `json:"public_key"` Jailed bool `json:"jailed"` // TODO(olshansky): Integrate with utility to update this. UPokt uint64 `json:"upokt"` // TODO(olshansky): Integrate with utility to update this. Host string `json:"host"` Port uint32 `json:"port"` DebugPort uint32 `json:"debug_port"` Chains []string `json:"chains"` // TODO(olshansky): Integrate with utility to update this. }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.