cache

package
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2017 License: ISC Imports: 5 Imported by: 0

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 Finalise

func Finalise()

Finalise stops the expiration check process

func Initialise

func Initialise() error

Initialise must be called before any operations to MemPool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL