simplepath

package
v0.0.0-...-3597e88 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package simplepath provides an implementation of paths.Finder that performs a breadth first search for paths against a stellar-core's database

Index

Constants

This section is empty.

Variables

View Source
var ErrNotEnough = errors.New("not enough depth")

ErrNotEnough represents an error that occurs when pricing a trade on an orderbook. This error occurs when the orderbook cannot fulfill the requested amount.

Functions

This section is empty.

Types

type Finder

type Finder struct {
	Q *core.Q
}

Finder implements the paths.Finder interface and searchs for payment paths using a simple breadth first search of the offers table of a stellar-core.

This implementation is not meant to be fast or to provide the lowest costs paths, but rather is meant to be a simple implementation that gives usable paths.

func (*Finder) Find

func (f *Finder) Find(q paths.Query) (result []paths.Path, err error)

Find performs a path find with the provided query.

Jump to

Keyboard shortcuts

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