package
0.9.5
Repository: https://github.com/itzmeanjan/harmony.git
Documentation: pkg.go.dev

# Functions

BigHexToBigDecimal - Given a hex encoded big number, converts it to decimal big integer.
BigHexToBigFloat - Converts hex encoded big integer to big floating point number @note To be used for better precision flaoting point arithmetic.
BigIntToBigFloat - Given big number, attempts to convert it to big floating point number.
CleanSlice - When we're done using one slice of txs, it's better to clean those up, so that it becomes eligible for GC.
FromMessagePack - Given serialized byte array, attempts to deserialize into structured tx format.
HexToDecimal - Converts hex encoded uint64 to decimal string.
HumanReadableGasPrice - Returns gas price paid for tx in Gwei unit.
Insert - Insert tx into slice of sorted mempool txs, while keeping it sorted If more memory allocation is required for inserting new element, it'll be done & new slice to be returned.
IsPresentInCurrentPool - Given tx hash, which was previously present in pending/ queued pool attempts to check whether it's present in current txpool content or not @note `txs` is current pending/ queued pool state received over RPC interface.
NumericGasPriceGwei - GasPrice in Gwei unit represented as floating point ( double precision ).
Remove - Removes existing entry from sorted slice of txs.
TrackNotFoundTxs - Those tx(s) which are found to be mined before actual pending tx is added into mempool, are kept track of here & pending pool pruner is informed about it, when it's found to be joining mempool, in some time future.
UntilNonceGap - Returns subslice of txs, where no nonce-gap exists for `> nonce + 1`.

# Constants

Sorting direction representation.
No description provided by the author
Sorting direction representation.
No description provided by the author
When submitting async request for pruning pending/ queued pool, immediate response to be sent to client in any of these form(s).
No description provided by the author
When submitting async request for pruning pending/ queued pool, immediate response to be sent to client in any of these form(s).
When submitting async request for pruning pending/ queued pool, immediate response to be sent to client in any of these form(s).
No description provided by the author
No description provided by the author

# Structs

AddRequest - For adding new tx into pool.
ConfirmedTx - When we learn a certain tx has been confirmed by listening to blocks getting mined, we'll attempt to dequeue any stuck tx from queued pool & put it into pending pool.
CountRequest - Getting #-of txs present in pool.
ExistsRequest - Checking whether tx is present in pool or not.
GetRequest - Obtaining reference to existing tx in pool.
LastSeenBlock - Which block number was last seen by header subscriber along with time.
ListRequest - Listing all txs in pool.
MemPool - Current state of mempool, where all pending/ queued tx(s) are present.
MemPoolTx - This is how tx is placed in mempool, after performing RPC call for fetching currently pending/ queued tx(s) in mempool it'll be destructured into this format, for further computation.
Msg - Response message sent to client.
NewSeenBlock - When new block is seen by header listener, concurrent-safe updation is sent to pending pool worker.
PendingPool - Currently present pending tx(s) i.e.
QueuedPool - Currently present queued tx(s) i.e.
RemovedUnstuckTx - Remove unstuck tx from queued pool, request to be sent in this form.
RemoveRequest - For removing existing tx into pool.
RemoveTxsRequest - For checking which txs can be removed from pending pool, this request to be sent to pending pool manager.
RemoveTxsFromQueuedPool - For updating local queued pool state, request of this form to be sent to pool manager over channel, where it'll check which txs are likely to be unstuck & has moved to pending pool.
Resource - Shared resources among multiple go routines Needs to be released carefully when shutting down.
Stat - Response to client queries for current mempool state to be sent in this form.
TxsFromARequest - When requesting for txs living in pool sent from some specific address, use this construct.
TxStatus - When ever multiple go routines need to concurrently fetch status of tx, given hash they will communicate back to caller using this data structure, where `status` denotes result of intended check, which was performed concurrently @note Data to be sent in this form over communication channel.

# Interfaces

No description provided by the author

# Type aliases

MemPoolTxsAsc - List of mempool tx(s) @note This structure to be used for sorting tx(s) in ascending way, using gas price they're paying.
MemPoolTxsDesc - List of mempool tx(s) @note This structure to be used for sorting tx(s) in descending way, using gas price they're paying.
TxsFromAddressAsc - List of txs, sent from same address sorted by their nonce.