Documentation ¶
Overview ¶
Package cache maintains the memory data store
***** Data Structure ***** Pool Key Value ExpiresAfter |___ PendingTransfer merkle.Digest (link) merkle.Digest (txid) 72h |___ UnverifiedTxIndex merkle.Digest (txid) pay.PayId 72h |___ UnverifiedTxEntries pay.PayId reservoir.unverifiedItem 72h |___ VerifiedTx merkle.Digest (txid) reservoir.verifiedItem never |___ OrphanPayment pay.PayId reservoir.orphanPayment 72h link ---------> txid -------------> payid ---------> unverifiedItem |________________|___________________|_____________________| PendingTransfer UnverifiedTxIndex UnverifiedTxEntries ***** Purpose ***** PendingTransfer: indexed by link so that duplicate transfers can be detected data is the tx id so that the same transfer repeated can be distinguished from an invalid duplicate transfer UnverifiedTxIndex & UnverifiedTxEntries: unverified transaction (issue and transfer) VerifiedTx: verified transaction (issue and transfer) OrphanPayment: when possible payment is already found, but no transfer transaction is received yet put the payment in the pool to wait for
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Pool pools
Pool is the interface to perform CRUD operations on objects stored in memory
Functions ¶
func Initialise ¶
func Initialise() error
Initialise must be called before any operations to MemPool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.