pendingpool

package
v0.0.0-...-f0b43a4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PendingData

type PendingData struct {
	PendingBal   uint64
	PendingNonce uint64
}

PendingData contains pending balance and pending nonce

func NewPendingData

func NewPendingData(pendingBal uint64, pendingNonce uint64) PendingData

NewPendingData returns an instance of pendingData given pending balance and pending nonce

type PendingMap

type PendingMap struct {
	Sender map[string]*PendingData
}

PendingMap contains a map that maps a hex encoded string of a wallet address to a pointer of PendingData

func NewPendingMap

func NewPendingMap() PendingMap

NewPendingMap returns an instance of pendingMap given a wallet address and an instance of pendingData

func (*PendingMap) Add

func (m *PendingMap) Add(c *contracts.Contract, accDB *sql.DB) error

Add returns an error if the process of validating the given contract has failed. Otherwise, Add either inserts the sender's PKhash and the PendingData struct into the map, or updates the pending balance and pending nonce for that sender's PKhash in the map

Jump to

Keyboard shortcuts

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