Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsApprovers(transactionHash trinary.Trytes) (result bool, err error)
- func ContainsBundle(headerTransactionHash trinary.Trytes) (result bool, err error)
- func ContainsTransaction(transactionHash trinary.Trytes) (result bool, err error)
- func ContainsTransactionMetadata(transactionHash trinary.Trytes) (result bool, err error)
- func DeleteTransactionHashForAddressInDatabase(address *TxHashForAddress) error
- func FlushApproversCache()
- func FlushBundleCache()
- func FlushTransactionCache()
- func FlushTransactionMetadata()
- func GetApprovers(transactionHash trinary.Trytes, ...) (result *approvers.Approvers, err error)
- func GetBundle(headerTransactionHash trinary.Trytes, ...) (result *bundle.Bundle, err error)
- func GetTransaction(transactionHash trinary.Trytes, ...) (result *value_transaction.ValueTransaction, err error)
- func GetTransactionMetadata(transactionHash trinary.Trytes, ...) (result *transactionmetadata.TransactionMetadata, err error)
- func ReadTransactionHashesForAddressFromDatabase(address trinary.Hash) ([]trinary.Hash, error)
- func SetRequester(req Requester)
- func StoreApprovers(approvers *approvers.Approvers)
- func StoreBundle(bundle *bundle.Bundle)
- func StoreTransaction(transaction *value_transaction.ValueTransaction)
- func StoreTransactionHashForAddressInDatabase(address *TxHashForAddress) error
- func StoreTransactionMetadata(transactionMetadata *transactionmetadata.TransactionMetadata)
- type Info
- type Requester
- type RequesterFunc
- type TxHashForAddress
- type UnsolidTxs
Constants ¶
View Source
const (
APPROVERS_CACHE_SIZE = 50000
)
View Source
const (
BUNDLE_CACHE_SIZE = 500
)
View Source
const (
TRANSACTION_CACHE_SIZE = 500
)
View Source
const (
TRANSACTION_METADATA_CACHE_SIZE = 500
)
View Source
const UnsolidInterval = time.Minute
Variables ¶
View Source
var (
ErrDatabaseError = errors.New("database error")
)
View Source
var Events = struct { TransactionStored *events.Event TransactionSolid *events.Event }{ TransactionStored: events.NewEvent(transactionCaller), TransactionSolid: events.NewEvent(transactionCaller), }
View Source
var PLUGIN = node.NewPlugin("Tangle", node.Enabled, configure, run)
Functions ¶
func ContainsApprovers ¶
func ContainsBundle ¶
func ContainsTransaction ¶
func DeleteTransactionHashForAddressInDatabase ¶
func DeleteTransactionHashForAddressInDatabase(address *TxHashForAddress) error
func FlushApproversCache ¶
func FlushApproversCache()
func FlushBundleCache ¶
func FlushBundleCache()
func FlushTransactionCache ¶
func FlushTransactionCache()
func FlushTransactionMetadata ¶
func FlushTransactionMetadata()
func GetApprovers ¶
func GetApprovers(transactionHash trinary.Trytes, computeIfAbsent ...func(trinary.Trytes) *approvers.Approvers) (result *approvers.Approvers, err error)
GetApprovers retrieves approvers from the database.
func GetBundle ¶
func GetBundle(headerTransactionHash trinary.Trytes, computeIfAbsent ...func(trinary.Trytes) (*bundle.Bundle, error)) (result *bundle.Bundle, err error)
GetBundle retrieves bundle from the database.
func GetTransaction ¶
func GetTransaction(transactionHash trinary.Trytes, computeIfAbsent ...func(trinary.Trytes) *value_transaction.ValueTransaction) (result *value_transaction.ValueTransaction, err error)
func GetTransactionMetadata ¶
func GetTransactionMetadata(transactionHash trinary.Trytes, computeIfAbsent ...func(trinary.Trytes) *transactionmetadata.TransactionMetadata) (result *transactionmetadata.TransactionMetadata, err error)
func SetRequester ¶
func SetRequester(req Requester)
func StoreApprovers ¶
func StoreBundle ¶
func StoreTransaction ¶
func StoreTransaction(transaction *value_transaction.ValueTransaction)
func StoreTransactionHashForAddressInDatabase ¶
func StoreTransactionHashForAddressInDatabase(address *TxHashForAddress) error
func StoreTransactionMetadata ¶
func StoreTransactionMetadata(transactionMetadata *transactionmetadata.TransactionMetadata)
Types ¶
type RequesterFunc ¶
func (RequesterFunc) RequestTransaction ¶
func (f RequesterFunc) RequestTransaction(hash trinary.Hash)
type UnsolidTxs ¶
func NewUnsolidTxs ¶
func NewUnsolidTxs() *UnsolidTxs
func (*UnsolidTxs) Add ¶
func (u *UnsolidTxs) Add(hash string) bool
func (*UnsolidTxs) Remove ¶
func (u *UnsolidTxs) Remove(hash string)
Click to show internal directories.
Click to hide internal directories.