dbm

package
v0.0.0-...-c562c7c Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const HashLength = 32

Variables

View Source
var (
	KeyLastHandledHeight       = []byte("last_handled_height")
	KeyBorrowerNumber          = []byte("number_of_borrowers")
	BorrowersPrefix            = []byte("borrowers") //prefix with all borrowers
	PricesPrefix               = []byte("prices")
	AccountPrefix              = []byte("account")
	MarketPrefix               = []byte("market")
	LiquidationBelow1P0Prefix  = []byte("liquidation_below_1p0")
	LiquidationBelow1P1Prefix  = []byte("liquidation_below_1p1")
	LiquidationBelow1P5Prefix  = []byte("liquidation_below_1p5")
	LiquidationBelow2P0Prefix  = []byte("liquidation_below_2p0")
	LiquidationAbove2P0Prefix  = []byte("liquidation_above_2p0")
	LiquidationNonProfitPrefix = []byte("liquidation_non_profit") //
	BadLiquidationTxPrefix     = []byte("bad_liquidation_tx")
	PendingLiquidationTxPrefix = []byte("pending_liquidation_tx")
)

Functions

func AccountStoreKey

func AccountStoreKey(account []byte) []byte

func BadLiquidationTxStoreKey

func BadLiquidationTxStoreKey(address []byte) []byte

func BorrowerNumberKey

func BorrowerNumberKey() []byte

func BorrowersStoreKey

func BorrowersStoreKey(address []byte) []byte

func LastHandledHeightStoreKey

func LastHandledHeightStoreKey() []byte

func LiquidationAbove2P0StoreKey

func LiquidationAbove2P0StoreKey(address []byte) []byte

func LiquidationBelow1P0StoreKey

func LiquidationBelow1P0StoreKey(address []byte) []byte

func LiquidationBelow1P1StoreKey

func LiquidationBelow1P1StoreKey(address []byte) []byte

func LiquidationBelow1P5StoreKey

func LiquidationBelow1P5StoreKey(address []byte) []byte

func LiquidationBelow2P0StoreKey

func LiquidationBelow2P0StoreKey(address []byte) []byte

func LiquidationNonProfitStoreKey

func LiquidationNonProfitStoreKey(address []byte) []byte

func MarketStoreKey

func MarketStoreKey(symbol []byte, account []byte) []byte

func NewDB

func NewDB(path string) (*leveldb.DB, error)

func PendingLiquidationTxStoreKey

func PendingLiquidationTxStoreKey(address []byte) []byte

Types

type Hash

type Hash [HashLength]byte

Hash to identify uniqueness

Jump to

Keyboard shortcuts

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