swap

package
v0.0.0-...-f8b7a73 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Swap

type Swap struct {
	// contains filtered or unexported fields
}

swap swarm会计协议 点对点小额支付系统 一个节点与每一个对等节点保持单个平衡。 只有有价格的消息才会被计入

func New

func New(stateStore state.Store) (swap *Swap)

新建-交换构造函数

func (*Swap) Add

func (s *Swap) Add(amount int64, peer *protocols.Peer) (err error)

swap实现协议。平衡接口 添加是(唯一)会计功能

func (*Swap) Close

func (swap *Swap) Close()

清理交换

func (*Swap) GetPeerBalance

func (swap *Swap) GetPeerBalance(peer enode.ID) (int64, error)

GetPeerBalance返回给定对等机的余额

Jump to

Keyboard shortcuts

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