node

package
v0.0.0-...-271626f Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OPRChain         = factom.NewBytes32("a642a8674f46696cc47fdb6b65f9c87b2a19c5ea8123b3d2f0c13b6f33a9d5ef")
	TransactionChain = factom.NewBytes32("cffce0f409ebba4ed236d49d89c70e4bd1f1367d86402a3363366683265a242d")

	PegnetActivation    uint32 = 206421
	GradingV2Activation uint32 = 210330

	// TransactionConversionActivation indicates when tx/conversions go live on mainnet.
	// Target Activation Height is Oct 7, 2019 15 UTC
	TransactionConversionActivation uint32 = 213237

	// This is when PEG is priced by the market cap equation
	// Estimated to be Oct 14 2019, 15:00:00 UTC
	PEGPricingActivation uint32 = 214287

	// OneWaypFCTConversions makes pFCT a 1 way conversion. This means pFCT->pXXX,
	// but no asset can go into pFCT. AKA pXXX -/> pFCT.
	// The only way to aquire pFCT is to burn FCT. The burn command will remain.
	// Estimated to be Nov 25, 2019 17:47:00 UTC
	OneWaypFCTConversions uint32 = 220346

	// Once this is activated, a maximum amount of PEG of 5,000 can be
	// converted per block. At a future height, a dynamic bank should be used.
	// Estimated to be  Dec 9, 2019, 17:00 UTC
	PegnetConversionLimitActivation uint32 = 222270

	// This is when PEG price is determined by the exchange price
	// Estimated to be  Dec 9, 2019, 17:00 UTC
	PEGFreeFloatingPriceActivation uint32 = 222270

	// V4OPRUpdate indicates the activation of additional currencies and ecdsa keys.
	// Estimated to be  Feb 12, 2020, 18:00 UTC
	V4OPRUpdate uint32 = 231620
)

Functions

func FactomClientFromConfig

func FactomClientFromConfig(conf *viper.Viper) *factom.Client

Types

type Pegnetd

type Pegnetd struct {
	FactomClient *factom.Client
	Config       *viper.Viper

	Sync   *pegnet.BlockSync
	Pegnet *pegnet.Pegnet
}

func NewPegnetStakingd

func NewPegnetStakingd(ctx context.Context, conf *viper.Viper) (*Pegnetd, error)

func (*Pegnetd) DBlockSync

func (d *Pegnetd) DBlockSync(ctx context.Context)

DBlockSync iterates through dblocks and syncs the various chains

func (*Pegnetd) Grade

func (d *Pegnetd) Grade(ctx context.Context, block *factom.EBlock) (grader.GradedBlock, error)

func (*Pegnetd) SyncBlock

func (d *Pegnetd) SyncBlock(ctx context.Context, tx *sql.Tx, height uint32) error

If SyncBlock returns no error, than that height was synced and saved. If any part of the sync fails, the whole sync should be rolled back and not applied. An error should then be returned. The context should be respected if it is cancelled

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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